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;
|
if (snake == NULL) return 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (snake->x == x || snake->y == y) return 1;
|
if (snake->x == x) {
|
||||||
|
if (snake->y == y) return 1;
|
||||||
|
}
|
||||||
|
|
||||||
} while (snake->next != NULL);
|
} while (snake->next != NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user