From b2520543857c32f738cef7c6493be6a1a789de7b Mon Sep 17 00:00:00 2001 From: Michal Utlak Date: Wed, 10 Apr 2024 21:00:59 +0200 Subject: [PATCH] is snake v2 --- cv9/snake.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cv9/snake.c b/cv9/snake.c index a0cf258..b5a963d 100644 --- a/cv9/snake.c +++ b/cv9/snake.c @@ -45,11 +45,9 @@ int is_snake(struct snake* snake,int x,int y){ if(pozicia->x == x && pozicia->y == y){ return 1; } - else{ - return 0; - } + pozicia = pozicia->next; } - + return 0; } int step_state(struct state* st){