domaca_uloha_7
This commit is contained in:
parent
2e2720ce15
commit
90b8a98abd
@ -2,12 +2,13 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
struct snake* add_snake(struct snake* snake,int x,int y){
|
||||
if (snake == NULL) return NULL;
|
||||
|
||||
struct snake* novyZaciatok;
|
||||
novyZaciatok->x = x;
|
||||
novyZaciatok->y = y;
|
||||
snake->next = novyZaciatok;
|
||||
|
||||
if (snake != NULL) {
|
||||
snake->next = novyZaciatok;
|
||||
}
|
||||
|
||||
return novyZaciatok;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user