Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
piece.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bPiece
 piece representation More...
 
class  bPieceColour
 
class  bWhitePiece
 
class  bBlackPiece
 
class  bEmptyPiece
 
class  bPawn
 
class  bWhitePawn
 
class  bBlackPawn
 
class  bKnight
 
class  bWhiteKnight
 
class  bBlackKnight
 
class  bBishop
 
class  bWhiteBishop
 
class  bBlackBishop
 
class  bRook
 
class  bWhiteRook
 
class  bBlackRook
 
class  bQueen
 
class  bWhiteQueen
 
class  bBlackQueen
 
class  bKing
 
class  bWhiteKing
 
class  bBlackKing
 

Macros

#define S_P_BISHOP   "B"
 
#define S_P_KING   "K"
 
#define S_P_KNIGHT   "N"
 
#define S_P_PAWN   "P"
 
#define S_P_QUEEN   "Q"
 
#define S_P_ROOK   "R"
 
#define S_P_EMPTY   ""
 

Typedefs

typedef enum tCPiece cpiece_t
 
typedef enum tPiece piece_t
 
typedef enum tPPiece ppiece_t
 
typedef enum tSide side_t
 

Enumerations

enum  tCPiece : unsigned char {
  C_EMPTY = ' ' , C_W_BISHOP = 'B' , C_W_KING = 'K' , C_W_KNIGHT = 'N' ,
  C_W_PAWN = 'P' , C_W_QUEEN = 'Q' , C_W_ROOK = 'R' , C_B_BISHOP = 'b' ,
  C_B_KING = 'k' , C_B_KNIGHT = 'n' , C_B_PAWN = 'p' , C_B_QUEEN = 'q' ,
  C_B_ROOK = 'r'
}
 
enum  tPiece : uint8_t {
  P_EMPTY = 0 , W_KING = 1 , W_PAWN , W_KNIGHT ,
  W_BISHOP , W_ROOK , W_QUEEN , B_KING = 7 ,
  B_PAWN , B_KNIGHT , B_BISHOP , B_ROOK ,
  B_QUEEN , P_SIZE
}
 
enum  tPPiece : uint8_t {
  N_P_EMPTY = 0 , N_P_KNIGHT , N_P_BISHOP , N_P_ROOK ,
  N_P_QUEEN , N_P_SIZE
}
 
enum  tStatPiece : uint8_t {
  STAT_PAWN = 0 , STAT_KNIGHT , STAT_BISHOP , STAT_ROOK ,
  STAT_QUEEN , STAT_SIZE
}
 
enum class  tSide : uint8_t { SIDE_UNDEFINED = 0 , SIDE_WHITE = 1 , SIDE_BLACK = 2 }
 

Functions

void bPiece_ctor ()
 
void bPiece_dtor ()
 
boardbitmap_t destinationbits (case_t const iCase, int8_t const ri, int8_t const ci)
 
boardbitmap_t destinationbits_king (case_t const iCase)
 
boardbitmap_t destinationbits_knight (case_t const iCase)
 

Macro Definition Documentation

◆ S_P_BISHOP

#define S_P_BISHOP   "B"

Definition at line 11 of file piece.h.

◆ S_P_KING

#define S_P_KING   "K"

Definition at line 12 of file piece.h.

◆ S_P_KNIGHT

#define S_P_KNIGHT   "N"

Definition at line 13 of file piece.h.

◆ S_P_PAWN

#define S_P_PAWN   "P"

Definition at line 14 of file piece.h.

◆ S_P_QUEEN

#define S_P_QUEEN   "Q"

Definition at line 15 of file piece.h.

◆ S_P_ROOK

#define S_P_ROOK   "R"

Definition at line 16 of file piece.h.

◆ S_P_EMPTY

#define S_P_EMPTY   ""

Definition at line 17 of file piece.h.

Typedef Documentation

◆ cpiece_t

typedef enum tCPiece cpiece_t

Definition at line 35 of file piece.h.

◆ piece_t

typedef enum tPiece piece_t

Definition at line 44 of file piece.h.

◆ ppiece_t

typedef enum tPPiece ppiece_t

Definition at line 52 of file piece.h.

◆ side_t

typedef enum tSide side_t

Definition at line 66 of file piece.h.

Enumeration Type Documentation

◆ tCPiece

enum tCPiece : unsigned char
Enumerator
C_EMPTY 
C_W_BISHOP 
C_W_KING 
C_W_KNIGHT 
C_W_PAWN 
C_W_QUEEN 
C_W_ROOK 
C_B_BISHOP 
C_B_KING 
C_B_KNIGHT 
C_B_PAWN 
C_B_QUEEN 
C_B_ROOK 

Definition at line 19 of file piece.h.

◆ tPiece

enum tPiece : uint8_t
Enumerator
P_EMPTY 
W_KING 
W_PAWN 
W_KNIGHT 
W_BISHOP 
W_ROOK 
W_QUEEN 
B_KING 
B_PAWN 
B_KNIGHT 
B_BISHOP 
B_ROOK 
B_QUEEN 
P_SIZE 

Definition at line 37 of file piece.h.

◆ tPPiece

enum tPPiece : uint8_t
Enumerator
N_P_EMPTY 
N_P_KNIGHT 
N_P_BISHOP 
N_P_ROOK 
N_P_QUEEN 
N_P_SIZE 

Definition at line 46 of file piece.h.

◆ tStatPiece

enum tStatPiece : uint8_t
Enumerator
STAT_PAWN 
STAT_KNIGHT 
STAT_BISHOP 
STAT_ROOK 
STAT_QUEEN 
STAT_SIZE 

Definition at line 54 of file piece.h.

◆ tSide

enum class tSide : uint8_t
strong
Enumerator
SIDE_UNDEFINED 
SIDE_WHITE 
SIDE_BLACK 

Definition at line 60 of file piece.h.

Function Documentation

◆ bPiece_ctor()

void bPiece_ctor ( )

Definition at line 34 of file piece.cpp.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bPiece_dtor()

void bPiece_dtor ( )

Definition at line 120 of file piece.cpp.

Referenced by main().

+ Here is the caller graph for this function:

◆ destinationbits()

boardbitmap_t destinationbits ( case_t const  iCase,
int8_t const  ri,
int8_t const  ci 
)

Definition at line 110 of file piece.cpp.

Referenced by destinationbits_king(), and destinationbits_knight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ destinationbits_king()

boardbitmap_t destinationbits_king ( case_t const  iCase)

Definition at line 84 of file piece.cpp.

Referenced by bPiece_ctor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ destinationbits_knight()

boardbitmap_t destinationbits_knight ( case_t const  iCase)

Definition at line 97 of file piece.cpp.

Referenced by bPiece_ctor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: