3cdb62cc2593c9f2672695b220aa122f0d77f441
[gnushogi.git] / gnushogi / book.h
1 /*
2  * FILE: book.h
3  *
4  * ----------------------------------------------------------------------
5  * Copyright (c) 1993, 1994, 1995 Matthias Mutz
6  * Copyright (c) 1999 Michael Vanier and the Free Software Foundation
7  *
8  * GNU SHOGI is based on GNU CHESS
9  *
10  * Copyright (c) 1988, 1989, 1990 John Stanback
11  * Copyright (c) 1992 Free Software Foundation
12  *
13  * This file is part of GNU SHOGI.
14  *
15  * GNU Shogi is free software; you can redistribute it and/or modify it
16  * under the terms of the GNU General Public License as published by the
17  * Free Software Foundation; either version 3 of the License,
18  * or (at your option) any later version.
19  *
20  * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT
21  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23  * for more details.
24  *
25  * You should have received a copy of the GNU General Public License along
26  * with GNU Shogi; see the file COPYING. If not, see
27  * <http://www.gnu.org/licenses/>.
28  * ----------------------------------------------------------------------
29  *
30  */
31
32 #ifndef _BOOK_H_
33 #define _BOOK_H_
34
35 struct gdxadmin
36 {
37     ULONG bookcount;
38     ULONG booksize;
39     ULONG maxoffset;
40 };
41
42 extern struct gdxadmin B;
43
44
45 #define GOODMOVE 0x1000
46 #define BADMOVE  0x0100
47 #define LASTMOVE 0x0010
48
49 struct gdxdata
50 {
51     ULONG  hashbd;
52     USHORT hashkey;
53     USHORT bmove;
54     USHORT flags; /* flags BADMOVE, GOODMOVE,  LASTMOVE */
55     USHORT hint;
56     USHORT count;
57 };
58
59
60 #define sizeof_gdxadmin sizeof(struct gdxadmin)
61 #define sizeof_gdxdata  sizeof(struct gdxdata)
62
63 #endif /* _BOOK_H_ */
64