diff options
Diffstat (limited to 'src/splitscreen_duo/games/snake.py')
| -rw-r--r-- | src/splitscreen_duo/games/snake.py | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/splitscreen_duo/games/snake.py b/src/splitscreen_duo/games/snake.py index b593ea1..83ee987 100644 --- a/src/splitscreen_duo/games/snake.py +++ b/src/splitscreen_duo/games/snake.py @@ -107,15 +107,15 @@ class Snake(GameBase): if result is not None: return result - elif event.type == pygame.KEYDOWN: - if action == "UP": - self.change_to = "UP" - elif action == "DOWN": - self.change_to = "DOWN" - elif action == "LEFT": - self.change_to = "LEFT" - elif action == "RIGHT": - self.change_to = "RIGHT" + + if action == "UP": + self.change_to = "UP" + elif action == "DOWN": + self.change_to = "DOWN" + elif action == "LEFT": + self.change_to = "LEFT" + elif action == "RIGHT": + self.change_to = "RIGHT" self.check_serial() self.move() @@ -125,11 +125,6 @@ class Snake(GameBase): continue - if self.check_collision(): - self.end_game(self.score) - - continue - self.screen.fill(BLACK) for segment in self.body: |