snake
view main.py @ 165:af59540d48a9
UI.start() function added (still need to check for bags)
UI.next_round() function added - passes
author | Alex Martynov |
---|---|
date | Thu, 23 Dec 2010 20:00:59 +0300 |
parents | de9d0b9071da |
children | f99b094a3d5d |
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 (without snakes) after end of the game."""
64 pass
68 return
71 pass
74 return
77 """Init running of the game."""
81 return
84 return
89 """Run the game with 'step_length' ms step
90 After the end of the game - restarts it with snakes survived in
91 previous game"""
95 return
98 """Do the next game step"""
100 return
104 pass
107 pass
110 pass
111 return
114 """Check the number of snakes alive.
115 End the game if alive snake number is less than two."""
120 pass
126 """"Restarts the game after the end of the game with snakes survived"""
136 pass
139 """End the game and raise the window that tels about it."""
142 pass
148 pass