belofte.h File Reference

#include <ctype.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>

Go to the source code of this file.

Defines

#define __BELOFTE_H__
#define BOOKNAME   "belofte-" MYVERSION ".book"
#define LOGNAME   "belofte-" MYVERSION ".log"
#define max(a, b)   ((a)>(b)?(a):(b))
#define MAX_DATANAME_LENGTH   256
#define MAX_FEN_LENGTH   128
#define MAX_GAME_LENGTH   256
#define MAX_MOVE_LENGTH   8
#define MAX_MOVES_PER_POSITION   200
#define min(a, b)   ((a)<(b)?(a):(b))
#define MOVERESULT_ERROR   -99
#define MOVERESULT_NIL   -1
#define MOVERESULT_OK   0
#define MYNAME   "Belofte"
#define MYVERSION   "0.2.8"
#define PGNNAME   "belofte-" MYVERSION ".pgn"

Typedefs

typedef unsigned char byte
typedef unsigned short int posid
typedef enum tBoolean t_boolean
typedef enum tColour t_colour
typedef float t_depth
typedef int t_field
typedef int t_flag
typedef int t_ply
typedef float t_score

Enumerations

enum  {
  A1 = 0, B1, C1, D1,
  E1, F1, G1, H1,
  A2, B2, C2, D2,
  E2, F2, G2, H2,
  A3, B3, C3, D3,
  E3, F3, G3, H3,
  A4, B4, C4, D4,
  E4, F4, G4, H4,
  A5, B5, C5, D5,
  E5, F5, G5, H5,
  A6, B6, C6, D6,
  E6, F6, G6, H6,
  A7, B7, C7, D7,
  E7, F7, G7, H7,
  A8, B8, C8, D8,
  E8, F8, G8, H8
}
enum  tBoolean { myFALSE = 0, myTRUE }
enum  tColour { COLOUR_WHITE = 0, COLOUR_BLACK }
enum  tFillMoves { NO_FILLMOVES = 0, FILLMOVES }

Functions

int board_applymove (const char *szCoordMove)
 apply standard move move entering is a move in the format from-case, to case, attribute will return a code if there is something special about the move applied
void board_print (void)
void board_setup (char *szFen)
 setboard function, will initialise by default to this cmd_setboard("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
int board_unapplymove (void)
 unapply standard move return false if unapply did not succeed
void cmd_constructor (char *szCommand, char *szArg)
void cmd_constructor2 (void)
 second constructor, taking more time and issued during protover command
void cmd_force (char *szCommand, char *szArg)
void cmd_go (char *szCommand, char *szArg)
void cmd_new (char *szCommand, char *szArg)
int cmd_peek (void)
 return true when there is a command in the queue
int cmd_readcommand (void)
 read input command from xboard return codes not used now
int cmd_readline (char *szBuffer, void *pFile, const size_t nSize)
 read line
void cmd_sd (char *szCommand, char *szArg)
void cmd_snd (const char *szMessage)
 reply to xboard, main and only routine for this purpose
void cmd_snd_info (const char *szMessage)
 return an info back to xboard
void cmd_snd_move (const char *szMove)
 send the move generated by the engine to xboard
void cmd_snd_thinking (const int nPly, const t_score fEval, const char *szThinking)
 return thinking statistics back
int file_readline (char *szBuffer, FILE *pFile, const size_t nSize)
 read line


Define Documentation

#define __BELOFTE_H__
 

#define BOOKNAME   "belofte-" MYVERSION ".book"
 

#define LOGNAME   "belofte-" MYVERSION ".log"
 

#define max a,
 )     ((a)>(b)?(a):(b))
 

#define MAX_DATANAME_LENGTH   256
 

#define MAX_FEN_LENGTH   128
 

#define MAX_GAME_LENGTH   256
 

#define MAX_MOVE_LENGTH   8
 

#define MAX_MOVES_PER_POSITION   200
 

#define min a,
 )     ((a)<(b)?(a):(b))
 

#define MOVERESULT_ERROR   -99
 

#define MOVERESULT_NIL   -1
 

#define MOVERESULT_OK   0
 

#define MYNAME   "Belofte"
 

#define MYVERSION   "0.2.8"
 

#define PGNNAME   "belofte-" MYVERSION ".pgn"
 


Typedef Documentation

typedef unsigned char byte
 

typedef unsigned short int posid
 

typedef enum tBoolean t_boolean
 

typedef enum tColour t_colour
 

typedef float t_depth
 

typedef int t_field
 

typedef int t_flag
 

typedef int t_ply
 

typedef float t_score
 


Enumeration Type Documentation

anonymous enum
 

Enumerator:
A1 
B1 
C1 
D1 
E1 
F1 
G1 
H1 
A2 
B2 
C2 
D2 
E2 
F2 
G2 
H2 
A3 
B3 
C3 
D3 
E3 
F3 
G3 
H3 
A4 
B4 
C4 
D4 
E4 
F4 
G4 
H4 
A5 
B5 
C5 
D5 
E5 
F5 
G5 
H5 
A6 
B6 
C6 
D6 
E6 
F6 
G6 
H6 
A7 
B7 
C7 
D7 
E7 
F7 
G7 
H7 
A8 
B8 
C8 
D8 
E8 
F8 
G8 
H8 

enum tBoolean
 

Enumerator:
myFALSE 
myTRUE 

enum tColour
 

Enumerator:
COLOUR_WHITE 
COLOUR_BLACK 

enum tFillMoves
 

Enumerator:
NO_FILLMOVES 
FILLMOVES 


Function Documentation

int board_applymove const char *  szCoordMove  ) 
 

apply standard move move entering is a move in the format from-case, to case, attribute will return a code if there is something special about the move applied

void board_print void   ) 
 

void board_setup char *  szFen  ) 
 

setboard function, will initialise by default to this cmd_setboard("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");

int board_unapplymove void   ) 
 

unapply standard move return false if unapply did not succeed

void cmd_constructor char *  szCommand,
char *  szArg
 

void cmd_constructor2 void   ) 
 

second constructor, taking more time and issued during protover command

void cmd_force char *  szCommand,
char *  szArg
 

void cmd_go char *  szCommand,
char *  szArg
 

void cmd_new char *  szCommand,
char *  szArg
 

int cmd_peek void   ) 
 

return true when there is a command in the queue

int cmd_readcommand void   ) 
 

read input command from xboard return codes not used now

int cmd_readline char *  szBuffer,
void *  pFile,
const size_t  nSize
 

read line

Returns:
0 if there is an end of file

void cmd_sd char *  szCommand,
char *  szArg
 

void cmd_snd const char *  szMessage  ) 
 

reply to xboard, main and only routine for this purpose

void cmd_snd_info const char *  szMessage  ) 
 

return an info back to xboard

void cmd_snd_move const char *  szMove  ) 
 

send the move generated by the engine to xboard

void cmd_snd_thinking const int  nPly,
const t_score  fEval,
const char *  szThinking
 

return thinking statistics back

int file_readline char *  szBuffer,
FILE *  pFile,
const size_t  nSize
 

read line

Returns:
0 if there is an end of file


Generated on Tue Jan 31 00:14:06 2006 for BelofteDoc by  doxygen 1.4.6