test
This commit is contained in:
parent
064535e74b
commit
9308618678
@ -11,7 +11,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) {
|
||||||
return NULL;
|
if (snake == NULL) return NULL;
|
||||||
|
struct snake* new_head = snake->next;
|
||||||
|
free(snake);
|
||||||
|
return new_head;
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_snake(struct snake* sn){
|
void free_snake(struct snake* sn){
|
||||||
|
Loading…
Reference in New Issue
Block a user