4 ** subclass of ai_player for a computer GIPF player
7 ** Copyright (C) 1998 Kurt Van den Branden
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.
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.
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.
26 #include "ai_player.h"
29 class ai_gipf
: public ai_player
{
36 vector
<basemove
*> * movelist
;
38 int evalfunc (void * game
, int maxplayer
);
39 void listfunc (void * game
, vector
<basemove
*> &);
40 void * newfunc (void * game
, basemove
* move
, int * finished
,
41 int * depthdelta
, int * nodetype
);
43 void * copymovefunc (void * move
);
44 void delmovefunc (void * move
);
46 void delgamefunc (void * game
);
49 void cleanupmovelist (vector
<basemove
*> * mlist
);
52 ai_gipf (char playercolour
, int gametype
);
55 void game_move (board
* oboard
, float timeleft
,
56 char * type
, char * from
, char * to
);
57 char game_gipf (board
* oboard
, float timeleft
, char * pos
);
58 char game_row (board
* oboard
, float timeleft
, char * start
, char * end
);
62 enum { // value for the type-field in gipf_move
69 class gipf_move
: public basemove
{
75 virtual basemove
* copy () ;
77 int type
; // G_MOVE, G_REMGIPF or G_REMROW
89 vector
<char *> gipflist
;
90 // listheader * gipflist; // (items are char-strings)
98 ** C-functions for calling from the main program
101 void * ai_gipf_new (char colour
, int game
);
102 void ai_gipf_move (board
* oboard
, void * self
, float timeleft
,
103 char * type
, char * from
, char * to
);
104 char ai_gipf_gipf (board
* oboard
, void * self
, float timeleft
, char * pos
);
105 char ai_gipf_row (board
* oboard
, void * self
, float timeleft
,
106 char * start
, char * end
);
107 void ai_gipf_end (void * self
);