Updated README: Equal sign not required with `--mode` flag.
[sgk-go] / engine / boardlib.c
CommitLineData
7eeb782e
AT
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
2 * This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
3 * http://www.gnu.org/software/gnugo/ for more information. *
4 * *
5 * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
6 * 2008 and 2009 by the Free Software Foundation. *
7 * *
8 * This program is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU General Public License as *
10 * published by the Free Software Foundation - version 3 or *
11 * (at your option) any later version. *
12 * *
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 in file COPYING for more details. *
17 * *
18 * You should have received a copy of the GNU General Public *
19 * License along with this program; if not, write to the Free *
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
21 * Boston, MA 02111, USA. *
22\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
23
24
25/* This file contains the global functions of the board library libboard.a. */
26
27#include "board.h"
28#include "hash.h"
29
30/* The board state itself. */
31int board_size = DEFAULT_BOARD_SIZE; /* board size */
32Intersection board[BOARDSIZE];
33int board_ko_pos;
34int white_captured; /* number of black and white stones captured */
35int black_captured;
36
37Intersection initial_board[BOARDSIZE];
38int initial_board_ko_pos;
39int initial_white_captured;
40int initial_black_captured;
41int move_history_color[MAX_MOVE_HISTORY];
42int move_history_pos[MAX_MOVE_HISTORY];
43Hash_data move_history_hash[MAX_MOVE_HISTORY];
44int move_history_pointer;
45
46float komi = 0.0;
47int handicap = 0;
48int movenum;
49enum suicide_rules suicide_rule = FORBIDDEN;
50enum ko_rules ko_rule = SIMPLE;
51
52
53signed char shadow[BOARDMAX];
54
55/* Hashing of positions. */
56Hash_data board_hash;
57
58int stackp; /* stack pointer */
59int position_number; /* position number */
60
61/* Some statistics gathered partly in board.c and hash.c */
62struct stats_data stats;
63
64/* Variation tracking in SGF trees: */
65int count_variations = 0;
66SGFTree *sgf_dumptree = NULL;