nSnake
A ncurses implementation of the classic Snake game
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Enumerations
Macros
Pages
src
nsnake.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
2
* nSnake - The classic snake game with ncurses. *
3
* Copyright (C) 2011-2012 Alexandre Dantas (kure) *
4
* *
5
* This file is part of nSnake. *
6
* *
7
* nSnake is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* any later version. *
11
* *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
19
* *
20
* homepage: http://sourceforge.net/projects/nsnake/ *
21
* *
22
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
23
29
#ifndef NSNAKE_DEFINED
30
#define NSNAKE_DEFINED
31
32
33
#ifndef TRUE
34
35
#define TRUE 1
36
#endif
37
38
#ifndef FALSE
39
40
#define FALSE 0
41
#endif
42
43
typedef
enum
{ MAIN_MENU, GAME_INIT, GAME, PAUSED, GAME_OVER, EXIT } states;
44
51
typedef
enum
{ FREE_MODE, BORDERS_ON, BORDERS_OFF }
modes
;
52
55
struct
game_t
56
{
57
modes
mode
;
58
int
level
;
59
states
state
;
60
int
cant_open_hscore_file
;
61
};
62
64
extern
struct
game_t
game
;
65
66
67
68
void
nsnake_abort
(
char
* error_msg);
69
void
nsnake_exit
();
70
void
nsnake_game_over ();
71
void
nsnake_init
();
72
void
nsnake_pause
();
73
74
75
#endif
Generated on Tue Jul 23 2013 13:37:00 for nSnake by
1.8.3.1