From 25b6f7245096df48656f309a4bf8c85abdc3c4d9 Mon Sep 17 00:00:00 2001 From: girst Date: Thu, 24 May 2018 16:25:49 +0200 Subject: [PATCH] clear keyboard buffer on game over to test: start with -l50, then stairstep into yourself. on restart, snake must not continue stairstepping. --- viiper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/viiper.c b/viiper.c index c51ffda..47f5354 100644 --- a/viiper.c +++ b/viiper.c @@ -162,6 +162,8 @@ int viiper(void) { timer_setup(1); g.t = time(NULL); + g.p = 0; + g.k.n = 0; spawn_item(FOOD, rand() % NUM_FOODS, NULL); //TODO: shape distribution, so bigger values get selected less -- 2.39.3