(Temporarily) set "animate" to "none" by default (broken feature).
[gf1.git] / thegame.h
blobfcd02ea7dedb8a1a8d7b30fc02097b571535f1ee
1 /*
2 ** $Id$
3 **
4 ** structures for playing a gipf-game
5 */
6 /*
7 ** Copyright (C) 1998 Kurt Van den Branden
8 **
9 ** This program is free software; you can redistribute it and/or modify
10 ** it under the terms of the GNU General Public License as published by
11 ** the Free Software Foundation; either version 2 of the License, or
12 ** (at your option) any later version.
13 **
14 ** This program is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ** GNU General Public License for more details.
18 **
19 ** You should have received a copy of the GNU General Public License
20 ** along with this program; if not, write to the Free Software
21 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _NEWGAME_H_
25 #define _NEWGAME_H_ 1
27 #include "board.h"
28 #include "gamelog.h"
29 #include "setup_win.h"
31 enum {
32 GAME_GO,
33 GAME_STOP
36 typedef struct {
37 struct {
38 int type;
39 char name[40];
40 int fulltime; // in seconds
41 float timer; // in seconds
42 void * self;
43 } player [2];
45 int game_type;
46 int state; // GAME_GO, GAME_STOP
47 board * boards[3]; // 0-> current board, 1->previous board, ...
48 gamelog * movelog;
49 int movecounter; // last item from the movelog checked with
50 // analysemove
51 configvalues * config;
52 } gamestruct;
54 gamestruct * show_new (gamestruct *);
55 gamestruct * show_start (board *);
56 gamestruct * show_onemove (board *, configvalues * conf);
57 board * verify_board (board * sboard);
58 void delete_game (gamestruct * gameptr);
59 void savegame (gamestruct * gameptr);
60 gamestruct * oldloadgame (char * filename);
61 gamestruct * loadgame (void);
62 void setupmove (gamestruct * thegame);
63 void gipf_questions (gamestruct * thegame);
64 void row_questions (gamestruct * thegame);
65 void computermove (gamestruct * thegame);
66 int humanmove (gamestruct * thegame);
67 void analysemove (gamestruct * thegame, int playertype);
68 void showmove (gamestruct * thegame, int playertype, logitem * item);
69 void showremgipf (gamestruct * thegame, int playertype, logitem * item);
70 void showremrow (gamestruct * thegame, int playertype, logitem * item);
72 void updatetimer (void * data);
73 void stoptimer (gamestruct * thegame);
74 void starttimer (gamestruct * thegame, char color);
76 void show_makegif (board * game);
78 #endif