![]() |
nSnake
A ncurses implementation of the classic Snake game
|
This file defines the core functions, variables and structures. More...

Go to the source code of this file.
Data Structures | |
| struct | game_t |
| Global definitions related to the game in general. More... | |
Enumerations | |
| enum | modes { FREE_MODE, BORDERS_ON, BORDERS_OFF } |
| The possible Game Modes. More... | |
Functions | |
| void | nsnake_abort (char *error_msg) |
| Aborts the game and displays the error message. | |
| void | nsnake_exit () |
| Interrupts the game and quits to the terminal. | |
| void | nsnake_game_over () |
| Finish the game after the snake have lost a life. | |
| void | nsnake_init () |
| Starts all the necessairy stuff. | |
| void | nsnake_pause () |
| It, umm, pauses the game, i guess. | |
Variables | |
| struct game_t | game |
| The global game structure. | |
This file defines the core functions, variables and structures.
| enum modes |
The possible Game Modes.
In Normal Mode, the snake dies by colliding with itself or the borders.
In Teleport Mode, the snake only dies by colliding with itself.
| void nsnake_abort | ( | char * | error_msg | ) |
Aborts the game and displays the error message.
| void nsnake_exit | ( | ) |
Interrupts the game and quits to the terminal.
| void nsnake_game_over | ( | ) |
Finish the game after the snake have lost a life.
| void nsnake_init | ( | ) |
Starts all the necessairy stuff.
Sets all the global variables and call the initial functions so the game may start.
1.7.6.1