Initialization

This commit is contained in:
Kozar 2024-04-17 15:57:26 +02:00
parent 50d70aa5de
commit a4f6ef7cd2

View File

@ -30,6 +30,12 @@ void free_snake(struct snake* sn) {
}
int is_snake(struct snake* snake,int x,int y){
while (snake != NULL) {
if (snake->x == x && snake->y == y) {
return 1;
}
snake = snake->next;
}
return 0;
}