From 4f01297bb4ffeebe40038f8ab6fc5fbbe82c0ba6 Mon Sep 17 00:00:00 2001 From: Weber Date: Tue, 16 Apr 2024 16:22:50 +0000 Subject: [PATCH] test --- cv9/snake.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cv9/snake.c b/cv9/snake.c index 3c522f6..829401e 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -35,7 +35,11 @@ struct snake* remove_snake(struct snake* snake) { void free_snake(struct snake* sn){ } -int is_snake(struct snake* snake,int x,int y){ +int is_snake(struct snake* snake, int x, int y) { + while (snake) { + if (snake->x == x && snake->y == y) return 1; + snake = snake->next; + } return 0; }