domaca_uloha_7
This commit is contained in:
parent
33861f4a21
commit
220b417b95
@ -16,6 +16,8 @@ struct snake* add_snake(struct snake* snake,int x,int y){
|
||||
}
|
||||
|
||||
struct snake* remove_snake(struct snake* snake){
|
||||
if (snake == NULL) return NULL;
|
||||
|
||||
struct snake* nasledujuci = calloc(1, sizeof(struct snake));
|
||||
nasledujuci = snake->next;
|
||||
free(snake);
|
||||
@ -31,6 +33,8 @@ void free_snake(struct snake* sn){
|
||||
free(sn);
|
||||
sn = nasledujuci;
|
||||
}
|
||||
|
||||
free(nasledujuci);
|
||||
}
|
||||
|
||||
int is_snake(struct snake* snake,int x,int y){
|
||||
|
Loading…
Reference in New Issue
Block a user