domaca_uloha_7
This commit is contained in:
parent
22fd9ec0ae
commit
b6741f316c
@ -52,7 +52,10 @@ int is_snake(struct snake* snake,int x,int y){
|
||||
if (snake == NULL) return 0;
|
||||
|
||||
do {
|
||||
if (snake->x == x || snake->y == y) return 1;
|
||||
if (snake->x == x) {
|
||||
if (snake->y == y) return 1;
|
||||
}
|
||||
|
||||
} while (snake->next != NULL);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user