snake
view main.py @ 160:56e7d0bfd362
changed numeration of the snakes
edited documentation
changed button placement
added restart button
added UI.step_length
author | Alex Martynov |
---|---|
date | Wed, 22 Dec 2010 19:35:56 +0300 |
parents | 7a4853ff834f |
children | 82de1358ded2 |
line source
9 """User Interface:
11 Atributes:
13 - 'root' - root Window game placed at
14 - 'engine' - engine of the game
15 - 'canvas' - Widget field is pictured at
16 - 'step_id' - current step of the game
17 - 'after_id' - identificator of runing game process
18 - 'step_legth' - fime of the step"""
20 """Create Python Battle game window.
21 Initialyze engige of the game."""
31 return
34 """Packing the buttons in root frame.
35 Definition of button functions."""
58 """Ask for snake file loading.
59 Initialyzing snake and draw it on the field.
60 Return field back to default after end of the game."""
64 pass
68 return
71 pass
74 return
77 """Run the game with 'step_length' ms step
78 After the end of the game - restarts it with snakes survived in
79 previous game"""
82 return
85 return
89 return
92 """Do the next game step"""
94 return
98 pass
101 pass
104 pass
105 return
108 """Check the number of snakes alive.
109 End the game if alive snake number is less than two."""
114 pass
120 """"Restarts the game after the end of the game with snakes survived"""
133 """End the game and raise the window that tels about it."""
136 pass
142 pass