summaryrefslogtreecommitdiff
path: root/Game.py
diff options
context:
space:
mode:
Diffstat (limited to 'Game.py')
-rw-r--r--Game.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Game.py b/Game.py
index 59d410a..af9b233 100644
--- a/Game.py
+++ b/Game.py
@@ -109,13 +109,13 @@ class Game:
return (pos in self.snake.cells) or (pos in map(lambda box: box.pos, self.boxes))
def tick(self):
- lastSnakeCell = self.snake.cells[len(self.snake.cells) - 1]
+ self.snake.move()
+
+ lastSnakeCell = self.snake.cells[0]#[len(self.snake.cells) - 1]
if (lastSnakeCell.x < 0 or lastSnakeCell.x >= self.width()) or (lastSnakeCell.y < 0 or lastSnakeCell.y >= self.height()):
self.nextLevel()
return
- self.snake.move()
-
for static in self.statics:
match static:
case PressurePlate():