f
This commit is contained in:
parent
896e5b643f
commit
6941842f95
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user