diff --git a/cv9/snake.c b/cv9/snake.c index daf1c61..404df01 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -10,7 +10,14 @@ struct snake* add_snake(struct snake* snake,int x,int y){ } struct snake* remove_snake(struct snake* snake){ - return NULL; + struct snake* head = calloc(1,sizeof(struct snake)); + struct snake* this = head; + this = this->next; + this = head; + while (this != NULL){ + this= this->next; + } + return head; } void free_snake(struct snake* sn){