Belofte  version 2.1.5
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
 

Namespaces

 tPPiece
 

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 uint16_t 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  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 ()
 

Variables

constexpr uint16_t tPPiece::N_P_CLEAR = 0xF0FF
 
constexpr uint16_t tPPiece::N_PROMOTION = 0x0F00
 
constexpr ppiece_t tPPiece::N_P_EMPTY = 0x0000
 
constexpr ppiece_t tPPiece::N_P_QUEEN = 0x0800
 
constexpr ppiece_t tPPiece::N_P_ROOK = 0x0400
 
constexpr ppiece_t tPPiece::N_P_BISHOP = 0x0200
 
constexpr ppiece_t tPPiece::N_P_KNIGHT = 0x0100
 

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 1 of file piece.h.

◆ piece_t

typedef enum tPiece piece_t

Definition at line 1 of file piece.h.

◆ ppiece_t

typedef uint16_t ppiece_t

Definition at line 46 of file piece.h.

◆ side_t

typedef enum tSide side_t

Definition at line 46 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.

◆ tStatPiece

enum tStatPiece : uint8_t
Enumerator
STAT_PAWN 
STAT_KNIGHT 
STAT_BISHOP 
STAT_ROOK 
STAT_QUEEN 
STAT_SIZE 

Definition at line 58 of file piece.h.

◆ tSide

enum tSide : uint8_t
strong
Enumerator
SIDE_UNDEFINED 
SIDE_WHITE 
SIDE_BLACK 

Definition at line 64 of file piece.h.

Function Documentation

◆ bPiece_ctor()

void bPiece_ctor ( )

Definition at line 32 of file piece.cpp.

Referenced by main().

+ Here is the caller graph for this function:

◆ bPiece_dtor()

void bPiece_dtor ( )

Definition at line 77 of file piece.cpp.

Referenced by main().

+ Here is the caller graph for this function: