3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
6 * Copyright (C) 2004 Andrew Sayman
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * Daniel Nelson - aluminumangel.org
35 #define MS_BOTH_KEY_WAIT (1 << 0)
36 #define MS_REMOTE_KEY_WAIT (1 << 1)
37 #define MS_LOCAL_KEY_WAIT (1 << 2)
38 #define MS_GAME_OVER_KEY_WAIT (1 << 3)
39 #define MS_READY_GAME_START (1 << 4)
40 #define MS_CELEBRATION_WAIT (1 << 5)
41 #define MS_GAME_PLAY (1 << 6)
42 #define MS_CONCESSION (1 << 7)
44 /* static */ class MetaState
{
46 static void programStart ( int _mode
,
47 char player_name
[GC_PLAYER_NAME_LENGTH
],
50 static void programEnd ( );
51 static void gameStart ( );
52 static void gameWon ( );
53 static void gameLoss ( );
54 static void gameFinish ( );
56 static void celebrationComplete ( );
58 static void localKeyPressed ( bool esc
);
59 static void remoteKeyPressed ( );
60 static void remoteReady ( );
62 // set to Game::time_step upon game finish
63 static int final_time_step
;
65 // current game state - playing, local key wait, ...
68 // global game mode - server, client, solo, ...
72 static char player_name
[GC_PLAYER_NAME_LENGTH
];