This commit is contained in:
Weber 2024-04-16 16:10:43 +00:00
parent 064535e74b
commit 9308618678

View File

@ -10,8 +10,11 @@ struct snake* add_snake(struct snake* snake, int x, int y) {
return hlava;
}
struct snake* remove_snake(struct snake* snake){
return NULL;
struct snake* remove_snake(struct snake* snake) {
if (snake == NULL) return NULL;
struct snake* new_head = snake->next;
free(snake);
return new_head;
}
void free_snake(struct snake* sn){