nSnake
A ncurses implementation of the classic Snake game
|
00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ 00002 * nSnake - The classic snake game with ncurses. * 00003 * Copyright (C) 2011-2012 Alexandre Dantas (kure) * 00004 * * 00005 * This file is part of nSnake. * 00006 * * 00007 * nSnake is free software: you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation, either version 3 of the License, or * 00010 * any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00019 * * 00020 * homepage: http://sourceforge.net/projects/nsnake/ * 00021 * * 00022 \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 00023 00029 #ifndef NSNAKE_DEFINED 00030 #define NSNAKE_DEFINED 00031 00032 00033 #ifndef TRUE 00034 00035 #define TRUE 1 00036 #endif 00037 00038 #ifndef FALSE 00039 00040 #define FALSE 0 00041 #endif 00042 00043 00046 struct game_t 00047 { 00049 int mode; 00051 int level; 00052 00054 int cant_open_hscore_file; 00055 }; 00056 00057 00059 extern struct game_t game; 00060 00061 00068 enum modes { FREE_MODE, BORDERS_ON, BORDERS_OFF }; 00069 00070 00071 void nsnake_abort (char* error_msg); 00072 void nsnake_exit (); 00073 void nsnake_game_over (); 00074 void nsnake_init (); 00075 void nsnake_pause (); 00076 00077 00078 #endif