Initialization
This commit is contained in:
parent
be69143eec
commit
6343d2b6ab
@ -2,7 +2,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
struct snake* add_snake(struct snake* snake,int x,int y){
|
struct snake* add_snake(struct snake* snake,int x,int y){
|
||||||
return NULL;
|
struct snake* head = calloc(1,sizeof(struct snake));
|
||||||
|
head->x = x;
|
||||||
|
head->y = y;
|
||||||
|
head->next = snake;
|
||||||
|
return head;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct snake* remove_snake(struct snake* snake){
|
struct snake* remove_snake(struct snake* snake){
|
||||||
|
Loading…
Reference in New Issue
Block a user