From 70975ce68225cf282c4dca939cb91284f7adbcf5 Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Fri, 29 Apr 2022 11:33:24 +0200 Subject: [PATCH] lol --- du7/snake.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/du7/snake.c b/du7/snake.c index c6a4296..6feb43f 100644 --- a/du7/snake.c +++ b/du7/snake.c @@ -1,5 +1,4 @@ #include -#include #include "snake.h" @@ -100,7 +99,7 @@ int step_state(struct state* st){ return END_FOOD; // - if(nx<0||ny<0||nx>=COLS||ny>=LINES) + if(nx<0||ny<0||nx>=st->width||ny>=st->height) return END_WALL; //