snake
view main.py @ 163:82de1358ded2
added new screen, restart now can operate at any moment
author | Alex Martynov |
---|---|
date | Thu, 23 Dec 2010 01:08:08 +0300 |
parents | 56e7d0bfd362 |
children | de9d0b9071da |
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"""
84 return
87 return
91 return
94 """Do the next game step"""
96 return
100 pass
103 pass
106 pass
107 return
110 """Check the number of snakes alive.
111 End the game if alive snake number is less than two."""
116 pass
122 """"Restarts the game after the end of the game with snakes survived"""
132 """End the game and raise the window that tels about it."""
135 pass
141 pass