board.h File Reference

#include "belofte.h"

Go to the source code of this file.

Data Structures

struct  st_board
struct  st_history

Defines

#define __BOARD_H__
#define LOWERCASEBIT   ('a' - 'A')

Typedefs

typedef st_board t_board
typedef enum tPiece t_piece
typedef enum tPromotion t_promotion

Enumerations

enum  tPiece {
  FIELD_EMPTY = ' ', PIECE_BISHOP = 'B', PIECE_KING = 'K', PIECE_KNIGHT = 'N',
  PIECE_PAWN = 'P', PIECE_QUEEN = 'Q', PIECE_ROOK = 'R', BLACK_BISHOP = 'b',
  BLACK_KING = 'k', BLACK_KNIGHT = 'n', BLACK_PAWN = 'p', BLACK_QUEEN = 'q',
  BLACK_ROOK = 'r', FIELD_BORDER = '#'
}
enum  tPromotion {
  PROMOTION_NONE = 0, PROMOTION_QUEEN = PIECE_QUEEN, PROMOTION_ROOK = PIECE_ROOK, PROMOTION_KNIGHT = PIECE_KNIGHT,
  PROMOTION_BISHOP = PIECE_BISHOP
}

Functions

int board_getmetadata (const char *szFlag)
 get some statistics about the board, to test threefold position, .
int board_sanapplymove (char *szMove, char *szCoordMove)
 apply move in san format for this we first have to make a list of all possible moves and then map the san move to this list


Define Documentation

#define __BOARD_H__
 

#define LOWERCASEBIT   ('a' - 'A')
 


Typedef Documentation

typedef struct st_board t_board
 

typedef enum tPiece t_piece
 

typedef enum tPromotion t_promotion
 


Enumeration Type Documentation

enum tPiece
 

Enumerator:
FIELD_EMPTY 
PIECE_BISHOP 
PIECE_KING 
PIECE_KNIGHT 
PIECE_PAWN 
PIECE_QUEEN 
PIECE_ROOK 
BLACK_BISHOP 
BLACK_KING 
BLACK_KNIGHT 
BLACK_PAWN 
BLACK_QUEEN 
BLACK_ROOK 
FIELD_BORDER 

enum tPromotion
 

Enumerator:
PROMOTION_NONE 
PROMOTION_QUEEN 
PROMOTION_ROOK 
PROMOTION_KNIGHT 
PROMOTION_BISHOP 


Function Documentation

int board_getmetadata const char *  szFlag  ) 
 

get some statistics about the board, to test threefold position, .

.. return 0: no board statistics of any meaning return 1: draw by lack of material

int board_sanapplymove char *  szMove,
char *  szCoordMove
 

apply move in san format for this we first have to make a list of all possible moves and then map the san move to this list


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