summary refs log tree commit diff homepage
path: root/snake.c
diff options
context:
space:
mode:
Diffstat (limited to 'snake.c')
-rw-r--r--snake.c7
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;
 }