/* gnuchess.h - Header file for GNU CHESS Revision: 1990-04-18 Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc. This file is part of CHESS. CHESS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the CHESS General Public License for full details. Everyone is granted permission to copy, modify and redistribute CHESS, but only under the conditions described in the CHESS General Public License. A copy of this license is supposed to have been given to you along with CHESS so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. */ #include /* > 3) #define column(a) ((a) & 7) #define locn(a,b) (((a) << 3) | b) #ifdef __ZTC__ #define distance(a,b) (distdata[((a) << 6) + (b)]) extern short *distdata; #else #define distance(a,b) distdata[a][b] extern short distdata[64][64]; #endif /* gnuchess.c external functions */ extern void NewGame (void); /* book.c */ extern int parse (FILE * fd, unsigned short int *mv, short int side); extern void GetOpenings (void); extern void OpeningBook (unsigned short int *hint); /* search.c */ extern void repetition (short int *cnt); extern void SelectMove (short int side, short int iop); extern int search (short int side, short int ply, short int depth, short int alpha, short int beta, unsigned short int *bstline, short int *rpt); /* tran.c */ #if ttblsz extern int ProbeTTable (short int side, short int depth, short int *alpha, short int *beta, short int *score); extern void PutInTTable (short int side, short int score, short int depth, short int alpha, short int beta, unsigned short int mv); extern void ZeroTTable (void); extern void ZeroRPT (void); #ifdef HASHFILE extern int ProbeFTable (short int side, short int depth, short int *alpha, short int *beta, short int *score); extern void PutInFTable (short int side, short int score, short int depth, short int alpha, short int beta, short unsigned int f, short unsigned int t); #endif /* HASHFILE */ #endif /* ttblsz */ /* move.c */ extern void Initialize_moves (void); extern void MoveList (short int side, short int ply); extern void CaptureList (short int side, short int ply); extern int castle (short int side, short int kf, short int kt, short int iop); extern void MakeMove (short int side, struct leaf * node, short int *tempb, short int *tempc, short int *tempsf, short int *tempst, short int *INCscore); extern void UnmakeMove (short int side, struct leaf * node, short int *tempb, short int *tempc, short int *tempsf, short int *tempst); extern void InitializeStats (void); /* eval.c */ extern int SqAtakd (short int sq, short int side); extern int evaluate (short int side, short int ply, short int alpha, short int beta, short int INCscore, short int *slk, short int *InChk); extern void ScoreLoneKing (short int side, short int *score); extern void ScorePosition (short int side, short int *score); extern void ExaminePosition (void); extern void UpdateWeights (void); /* *dsp.c external functions */ extern void Initialize (void); extern void InputCommand (void); extern void ExitChess (void); extern void ClrScreen (void); extern void SetTimeControl (void); extern void SelectLevel (void); extern void UpdateDisplay (short int f, short int t, short int flag, short int iscastle); extern void ElapsedTime (short int iop); extern void ShowSidetomove (void); extern void SearchStartStuff (short int side); extern void ShowDepth (char ch); extern void ShowResults (short int score, unsigned short int *bstline, char ch); extern void algbr (short int f, short int t, short int flag); extern void OutputMove (void); extern void ShowCurrentMove (short int pnt, short int f, short int t); extern void ListGame (void); extern void ShowMessage (char *s); extern void ClrScreen (void); extern void gotoXY (short int x, short int y); extern void ClrEoln (void); extern void DrawPiece (short int sq); extern void UpdateClocks (void);