hlavicka
This commit is contained in:
parent
c9772bea75
commit
710956e0df
10
cv9/snake.c
10
cv9/snake.c
@ -2,9 +2,19 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
struct snake* add_snake(struct snake* snake,int x,int y){
|
||||
struct snake* hlavicka = (struct snake*)malloc(sizeof(struct snake));
|
||||
if (hlavicka == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hlavicka->x = x;
|
||||
hlavicka->y = y;
|
||||
|
||||
hlavicka->next = snake;
|
||||
|
||||
return hlavicka;
|
||||
}
|
||||
|
||||
struct snake* remove_snake(struct snake* snake){
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user