nSnake
A ncurses implementation of the classic Snake game
|
The core functions of the game - except for the main. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "nsnake.h"
#include "engine.h"
#include "fruit.h"
#include "player.h"
#include "hscores.h"
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. |
The core functions of the game - except for the main.
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.