|
|
1.1 root 1: /*
2: This file contains code for CHESS.
3: Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc.
4:
5: This file is part of CHESS.
6:
7: CHESS is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY. No author or distributor
9: accepts responsibility to anyone for the consequences of using it
10: or for whether it serves any particular purpose or works at all,
11: unless he says so in writing. Refer to the CHESS General Public
12: License for full details.
13:
14: Everyone is granted permission to copy, modify and redistribute
15: CHESS, but only under the conditions described in the
16: CHESS General Public License. A copy of this license is
17: supposed to have been given to you along with CHESS so you
18: can know your rights and responsibilities. It should be in a
19: file named COPYING. Among other things, the copyright notice
20: and this notice must be preserved on all copies.
21: */
22:
23:
24: /* Header file for GNU CHESS */
25:
26: #define neutral 2
27: #define white 0
28: #define black 1
29: #define no_piece 0
30: #define pawn 1
31: #define knight 2
32: #define bishop 3
33: #define rook 4
34: #define queen 5
35: #define king 6
36: #define pxx " PNBRQK"
37: #define qxx " pnbrqk"
38: #define rxx "12345678"
39: #define cxx "abcdefgh"
40: #define check 0x0001
41: #define capture 0x0002
42: #define draw 0x0004
43: #define promote 0x0008
44: #define cstlmask 0x0010
45: #define epmask 0x0020
46: #define exact 0x0040
47: #define pwnthrt 0x0080
48: #define maxdepth 30
49: #define true 1
50: #define false 0
51:
52: struct leaf
53: {
54: short f,t,score,reply;
55: unsigned short flags;
56: };
57: struct GameRec
58: {
59: unsigned short gmove;
60: short score,depth,time,piece,color;
61: long nodes;
62: };
63: struct TimeControlRec
64: {
65: short moves[2];
66: long clock[2];
67: };
68: struct BookEntry
69: {
70: struct BookEntry *next;
71: unsigned short *mv;
72: };
73:
74: extern char mvstr1[5],mvstr2[5];
75: extern struct leaf Tree[2000],*root;
76: extern short TrPnt[maxdepth],board[64],color[64];
77: extern short row[64],column[64],locn[8][8];
78: extern short atak[2][64],PawnCnt[2][8];
79: extern short castld[2],kingmoved[2];
80: extern short c1,c2,*atk1,*atk2,*PC1,*PC2;
81: extern short mate,post,opponent,computer,Sdepth,Awindow,Bwindow,dither;
82: extern long ResponseTime,ExtraTime,Level,et,et0,time0,cputimer,ft;
83: extern long NodeCnt,evrate,ETnodes,EvalNodes,HashCnt;
84: extern short quit,reverse,bothsides,hashflag,InChk,player,force,easy,beep,meter;
85: extern short timeout,xwndw;
86: extern struct GameRec GameList[240];
87: extern short GameCnt,Game50,epsquare,lpost,rcptr,contempt;
88: extern short MaxSearchDepth;
89: extern struct BookEntry *Book;
90: extern struct TimeControlRec TimeControl;
91: extern short TCflag,TCmoves,TCminutes,OperatorTime;
92: extern short otherside[3];
93: extern short Stboard[64];
94: extern short Stcolor[64];
95: extern unsigned short hint,PrVar[maxdepth];
96:
97: #define HZ 60
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.