This commit is contained in:
Sadchenko 2024-04-18 08:34:19 +02:00
parent 896e5b643f
commit 6941842f95

View File

@ -36,7 +36,7 @@ void test_remove_snake_non_empty() {
struct snake* new_head = remove_snake(head); struct snake* new_head = remove_snake(head);
if (new_head != NULL && new_head->x == 2 && new_head->y == 2) { if (new_head != NULL && new_head->x == 3 && new_head->y == 3) {
printf("Test passed: new head coordinates are correct.\n"); printf("Test passed: new head coordinates are correct.\n");
} else { } else {
printf("Test failed: new head coordinates are incorrect.\n"); printf("Test failed: new head coordinates are incorrect.\n");
@ -44,6 +44,7 @@ void test_remove_snake_non_empty() {
free(new_head); free(new_head);
free(tail);
} }
int is_snake(struct snake* snake, int x, int y) { int is_snake(struct snake* snake, int x, int y) {