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; //