snake
view main.py @ 158:7fc18f23ae89
Added rule to evade trapping yourself while eating for e4 snake
author | Daniil Alexeyevsky <me.dendik@gmail.com> |
---|---|
date | Wed, 22 Dec 2010 00:06:14 +0300 |
parents | 4e9a51811716 |
children | 3c909a161978 |
line source
9 """User Interface:"""
11 """Create Python Battle game window.
12 Initialyze engige of the game."""
21 return
24 """Packing the buttons in root frame.
25 Definition of button functions."""
46 """Ask for snake file loading.
47 Initialyzing snake and draw it on the field.
48 Return field back to default after end of the game."""
52 pass
56 return
59 pass
62 return
65 """Run the game with 150 ms step"""
67 return
70 return
74 return
76 """Do the next game step"""
78 return
82 pass
85 pass
88 pass
89 return
92 """Check the number of snakes alive.
93 End the game if alive snake number is less than two."""
98 pass
104 """End the game and raise the window that tels about it."""
107 pass
113 pass