diff --git a/serpent.c b/serpent.c index 26d0e0b..5d7c8ea 100644 --- a/serpent.c +++ b/serpent.c @@ -48,28 +48,6 @@ Snake *snake; Apple *apple; /* */ -/* Function prototypes */ -Snake *startSnake(); -Apple *startApple(); -void appendSnakeNode(Snake *new_snake); -void freeSnake(); -int snakeSize(); -void updateSnake(); -void updateApple(); -bool snakeCollision(int x, int y, bool excludeHead); -bool appleCollision(int x, int y); -void handleInput(int key); -void drawGame(); -int initializeGame(); -void gameLoop(); -void run(); -void mainMenu(WINDOW *menuScreen, int menuType); -void cleanup(); -void argControls(); -void argHelp(); -void argVersion(); -/* */ - int main (int argc, char **argv) { /* Command line parsing */ int option; diff --git a/serpent.h b/serpent.h index 4f7f447..059b030 100644 --- a/serpent.h +++ b/serpent.h @@ -1,5 +1,6 @@ #ifndef SERPENT_H #define SERPENT_H +#include /* Program information */ #define NAME "serpent" @@ -47,4 +48,26 @@ typedef struct Food { int pX, pY; /* represents the apple's position on the board */ } Apple; +/* Function prototypes */ +Snake *startSnake(); +Apple *startApple(); +void appendSnakeNode(Snake *new_snake); +void freeSnake(); +int snakeSize(); +void updateSnake(); +void updateApple(); +bool snakeCollision(int x, int y, bool excludeHead); +bool appleCollision(int x, int y); +void handleInput(int key); +void drawGame(); +int initializeGame(); +void gameLoop(); +void run(); +void mainMenu(WINDOW *menuScreen, int menuType); +void cleanup(); +void argControls(); +void argHelp(); +void argVersion(); +/* */ + #endif //SERPENT_H