Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,49 @@ def main():
|
|
| 49 |
play_loop = game.repeat(game.timePerFrame/60, 1, update)
|
| 50 |
|
| 51 |
def update(deltaTime):
|
| 52 |
-
global
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
play_loop = game.repeat(game.timePerFrame/60, 1, update)
|
| 50 |
|
| 51 |
def update(deltaTime):
|
| 52 |
+
global game
|
| 53 |
+
|
| 54 |
+
# Setup Food Manager
|
| 55 |
+
food_manager = FoodManager()
|
| 56 |
+
|
| 57 |
+
while True:
|
| 58 |
+
# Initialize game components
|
| 59 |
+
initGameComponents()
|
| 60 |
+
|
| 61 |
+
# Start playing the game
|
| 62 |
+
playLoop()
|
| 63 |
+
|
| 64 |
+
def checkCollision():
|
| 65 |
+
# Check collisions here
|
| 66 |
+
pass
|
| 67 |
+
|
| 68 |
+
def setScoreText():
|
| 69 |
+
# Set scores
|
| 70 |
+
pass
|
| 71 |
+
|
| 72 |
+
def addBodyParts():
|
| 73 |
+
# Add body parts
|
| 74 |
+
pass
|
| 75 |
+
|
| 76 |
+
def removeTailSegments():
|
| 77 |
+
# Remove tail segments
|
| 78 |
+
pass
|
| 79 |
+
|
| 80 |
+
def addHeadAndTailSegmentToBoard():
|
| 81 |
+
# Add head and tail segment to board
|
| 82 |
+
pass
|
| 83 |
+
|
| 84 |
+
def growWithoutEating():
|
| 85 |
+
# Grow without eating
|
| 86 |
+
pass
|
| 87 |
+
|
| 88 |
+
def stopPlaying():
|
| 89 |
+
# Stop Playing
|
| 90 |
+
pass
|
| 91 |
+
|
| 92 |
+
def changeDirectionAfterCrash():
|
| 93 |
+
# Change Direction After Crash
|
| 94 |
+
pass
|
| 95 |
+
|
| 96 |
+
initGameComponents()
|
| 97 |
+
playLoop()
|