2
* Chess game module for Guru
3
* Variant: Interface for GNU Chess/XBoard AI
4
* Copyright (C) 2004 - 2006 Josef Spillner, josef@ggzgamingzone.org
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
/* Sets up a chess board in an (0-64) array */
30
/* The color is the one the player is using */
31
void gnuchess_ai_init(int color, int depth);
33
/* Move a figure on the chess board */
34
/* Returns 1 on success, 0 on invalid move */
35
int gnuchess_ai_move(int from, int to, int force);
38
/* Returns 1 if found, 0 if not found */
39
int gnuchess_ai_find(int color, int *from, int *to);
41
/* Outputs the board to the console */
42
void gnuchess_ai_output(void);
45
/* Returns 1 if legal, 0 if not */
46
int gnuchess_ai_rochade(int color, int which);
49
/* Returns 1 if successful, 0 if not */
50
int gnuchess_ai_exchange(int pos, int *figure);
52
/* Checkmate or stalemate (draw) */
53
/* Returns 1 on checkmate, 0 for game continuation */
54
int gnuchess_ai_checkmate(void);
56
/* GNU Chess/XBoard interface */
57
int gnuchess_launch(void);
58
int gnuchess_check(void);
59
void gnuchess_shutdown(void);