Hugorowan commited on
Commit
efa4041
1 Parent(s): 9af1b32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +46 -4
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 head, tail, food_positions, food_manager
53
- while deltaTime > 0:
54
- current_state = check_collision()
55
- if food_manager.amount and all(not c[-1] for c in food_):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()