Initialization
This commit is contained in:
parent
f34a09b2b6
commit
50d70aa5de
@ -10,11 +10,10 @@ struct snake* add_snake(struct snake* snake,int x,int y){
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct snake* remove_snake(struct snake* snake) {
|
struct snake* remove_snake(struct snake* snake) {
|
||||||
struct snake* head;
|
struct snake* temp = snake;
|
||||||
struct snake* this = head;
|
if (snake!= NULL) {
|
||||||
while (head!= NULL) {
|
snake = snake->next;
|
||||||
head = snake->next;
|
free(temp);
|
||||||
free(this);
|
|
||||||
}
|
}
|
||||||
return snake;
|
return snake;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user