projects
/
snake.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22c3cc7
)
get any pending keys each cycle
author
Geoffrey Allott
<geoffrey@allott.email>
Sun, 25 Dec 2022 20:32:36 +0000
(20:32 +0000)
committer
Geoffrey Allott
<geoffrey@allott.email>
Sun, 25 Dec 2022 20:32:36 +0000
(20:32 +0000)
snake.py
patch
|
blob
|
history
diff --git
a/snake.py
b/snake.py
index 7d70dde4f0912d554f45fdac4b6d353382ea89c4..6be31c3f6866daf9fcd404ddd2e1ae7cb1aec492 100644
(file)
--- a/
snake.py
+++ b/
snake.py
@@
-256,6
+256,8
@@
class GameArea:
raise ExitGameException()
if ch == ord('r'):
raise RestartGameException()
+ if ch != -1:
+ self.getch()
def random_empty_tile(self):
return self.random.choice([