domaca_uloha_7

This commit is contained in:
Tomáš Vasiľ 2022-04-27 18:58:58 +02:00
parent 22fd9ec0ae
commit b6741f316c

View File

@ -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;