Aktualizovat du4 /snake.c
This commit is contained in:
parent
4cefc5a5a6
commit
3752289928
12
du4 /snake.c
12
du4 /snake.c
@ -24,8 +24,16 @@ struct snake* remove_snake(struct snake* snake){
|
||||
|
||||
void free_snake(struct snake* sn)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int is_snake(struct snake* snake,int x,int y){
|
||||
if (snake == NULL)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//pomocna pointer premanna
|
||||
struct snake* currentPtr = sn;
|
||||
struct snake* currentPtr = snake;
|
||||
while (currentPtr != NULL)
|
||||
{
|
||||
//uloz dalsiu cast
|
||||
@ -33,9 +41,7 @@ void free_snake(struct snake* sn)
|
||||
free(currentPtr);
|
||||
currentPtr = nextPtr;
|
||||
}
|
||||
}
|
||||
|
||||
int is_snake(struct snake* snake,int x,int y){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user