diff options
Diffstat (limited to '')
-rw-r--r-- | snake.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/snake.c b/snake.c index 62f660f..1437deb 100644 --- a/snake.c +++ b/snake.c @@ -205,7 +205,12 @@ uint playSnake(void) { draw(); while (ERR != getch()); nodelay(stdscr, false); - getch(); + int ch; + do { + ch = getch(); + } while ( + ch == KEY_LEFT || ch == KEY_DOWN || ch == KEY_UP || ch == KEY_RIGHT + ); return score; } |