test
This commit is contained in:
parent
4adb599116
commit
4f01297bb4
@ -36,6 +36,10 @@ void free_snake(struct snake* sn){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int is_snake(struct snake* snake, int x, int y) {
|
int is_snake(struct snake* snake, int x, int y) {
|
||||||
|
while (snake) {
|
||||||
|
if (snake->x == x && snake->y == y) return 1;
|
||||||
|
snake = snake->next;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user