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