Initialization

This commit is contained in:
Kozar 2024-04-11 14:40:02 +02:00
parent f34a09b2b6
commit 50d70aa5de

View File

@ -10,11 +10,10 @@ struct snake* add_snake(struct snake* snake,int x,int y){
}
struct snake* remove_snake(struct snake* snake) {
struct snake* head;
struct snake* this = head;
while (head!= NULL) {
head = snake->next;
free(this);
struct snake* temp = snake;
if (snake!= NULL) {
snake = snake->next;
free(temp);
}
return snake;
}