This commit is contained in:
Tančáková 2024-04-08 15:20:22 +02:00
parent d72c96d0c6
commit 9ec5ae06fe

View File

@ -1,24 +1,6 @@
#include <stdio.h> #include "snake.h"
#include <stdlib.h> #include <stdlib.h>
#define FOOD_COUNT 5
struct snake {
int x;
int y;
struct snake* next;
};
struct state {
struct snake* snake;
int foodx[FOOD_COUNT];
int foody[FOOD_COUNT];
int sx;
int sy;
int width;
int height;
};
struct snake* add_snake(struct snake* snake, int x, int y) { struct snake* add_snake(struct snake* snake, int x, int y) {
struct snake* head = (struct snake*)malloc(sizeof(struct snake)); struct snake* head = (struct snake*)malloc(sizeof(struct snake));
if (head == NULL) { if (head == NULL) {
@ -57,8 +39,8 @@ void free_snake(struct snake* snake) {
} }
} }
int main() { int step_state(struct state* state) {
// Place your testing code here // Implement step_state function here
return 0; return END_CONTINUE;
} }