domaca_uloha_7
This commit is contained in:
parent
199ef7191c
commit
22fd9ec0ae
@ -49,6 +49,8 @@ void free_snake(struct snake* sn){ //funkcia odstráni hada z hry
|
||||
}
|
||||
|
||||
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;
|
||||
} while (snake->next != NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user