snake
view main.py @ 168:0f7df983d610
fixed bag of unlimited run
added screen
author | Alex Martynov |
---|---|
date | Thu, 23 Dec 2010 20:31:09 +0300 |
parents | 36756bd7e7ed |
children | 4eec473f445b |
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' - length of the step (in ms)
19 - 'game_length' - number of the steps in one round of the game"""
21 """Create Python Battle game window.
22 Initialyze engige of the game."""
33 return
36 """Packing the buttons in root frame.
37 Definition of button functions."""
60 """Ask for snake file loading.
61 Initialyzing snake and draw it on the field.
62 Return field back to default (without snakes) after end of the game."""
66 pass
70 return
73 pass
76 return
79 """Init running of the game."""
83 return
88 """Run the game with 'step_length' ms step
89 After the end of the game - restarts it with snakes survived in
90 previous game"""
93 return
97 return
100 """Do the next game step"""
102 return
106 pass
109 pass
112 pass
113 return
116 """Check the number of snakes alive.
117 End the game if alive snake number is less than two."""
122 pass
128 """"Restarts snakes positions after the end of the game
130 Options:
131 survived = "yes" - restarts next round only with snakes survived in previous round
132 survived = "no" - restart next roun with all snakes played in previous round"""
146 """End the game and raise the window that tels about it."""
149 pass
155 pass