This commit is contained in:
Andrii Hermaniuk 2022-04-29 11:33:24 +02:00
parent 82382e711e
commit 70975ce682

View File

@ -1,5 +1,4 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdlib.h>
#include "snake.h" #include "snake.h"
@ -100,7 +99,7 @@ int step_state(struct state* st){
return END_FOOD; 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; return END_WALL;
// //