projects
/
snake.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5918e6a
)
prevent score showing +1 on game over
author
Geoffrey Allott
<geoffrey@allott.email>
Tue, 6 Dec 2022 19:20:29 +0000
(19:20 +0000)
committer
Geoffrey Allott
<geoffrey@allott.email>
Tue, 6 Dec 2022 19:20:29 +0000
(19:20 +0000)
snake.py
patch
|
blob
|
history
diff --git
a/snake.py
b/snake.py
index 664eab9d30c4163c5f79488ab6e506bb1cea1ca5..dd1ec29a1812032aa787296ae1bc36dc9dfecd69 100644
(file)
--- a/
snake.py
+++ b/
snake.py
@@
-220,9
+220,11
@@
class GameArea:
self.tiles[r][c] = TileContents.Empty
elif self.tiles[r][c] is TileContents.Snake:
self.tiles[r][c] = TileContents.Dead
+ self.snake = self.snake[1:]
self.game_over()
elif self.tiles[r][c] is TileContents.Wall:
self.tiles[r][c] = TileContents.Dead
+ self.snake = self.snake[1:]
self.game_over()
else:
self.tiles[r][c] = TileContents.Snake