From 9ec5ae06fe48b7ed53daa288d3a608c1e1a3c72c Mon Sep 17 00:00:00 2001 From: st529yr Date: Mon, 8 Apr 2024 15:20:22 +0200 Subject: [PATCH] funguje --- cv9/snake.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/cv9/snake.c b/cv9/snake.c index 3818cac..12f37e5 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -1,24 +1,6 @@ -#include +#include "snake.h" #include -#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* head = (struct snake*)malloc(sizeof(struct snake)); if (head == NULL) { @@ -57,8 +39,8 @@ void free_snake(struct snake* snake) { } } -int main() { - // Place your testing code here - return 0; +int step_state(struct state* state) { + // Implement step_state function here + return END_CONTINUE; }