diff --git a/serpent.c b/serpent.c index cd55647..26d0e0b 100644 --- a/serpent.c +++ b/serpent.c @@ -253,7 +253,6 @@ void updateSnake() { snake->tail->next = NULL; snake->head->prev->prev = NULL; snake->head = snake->head->prev; - } else { /* If the head overlaps with an apple (the snake ate an apple), move the apple to a new position */ updateApple(); @@ -479,6 +478,7 @@ int initializeGame() { /* Initialize the apple */ apple = startApple(); + /* Run the game */ run(); return 0; } diff --git a/serpent.h b/serpent.h index 9685e64..4f7f447 100644 --- a/serpent.h +++ b/serpent.h @@ -44,7 +44,7 @@ typedef struct Snake { /* Apple structure */ typedef struct Food { - int pX, pY; /* represents the apple's position on the board */ + int pX, pY; /* represents the apple's position on the board */ } Apple; #endif //SERPENT_H