Belofte
version 2.1.5
A promising chess program using the UCI or Winboard interface
|
Public Member Functions | |
int16_t | getPly () const |
void | setPly (int16_t const p) |
case_t | getEp () const |
void | setEp (case_t const e) |
int16_t | getPly50Moves () const |
void | setPly50Moves (int16_t const p) |
bool | canCastle (uint8_t const f) const |
void | setCastle (uint8_t const f, bool const c) |
void | clearCastle (uint8_t const f) |
bool | whiteToMove () const |
int16_t | getMoveNumber () const |
side_t | getColourToMove () const |
piece_t | getPiece (case_t const bc) const |
1 for white, 2 for black More... | |
piece_t | getPiece (column_t const iColumn, rank_t const iRank) const |
piece_t | getPieceCtl (column_t const iColumn, rank_t const iRank) const |
retrieve piece with bounds checking, return field empty in case of out of bounds More... | |
void | setPiece (case_t const bc, piece_t const piece) |
used for promotion move generation only More... | |
void | movePiece (case_t const f, case_t const t, piece_t const p) |
void | swapPiece (case_t const t, piece_t const op, piece_t const np) |
void | moveWhiteKing (case_t const f, case_t const t) |
void | moveBlackKing (case_t const f, case_t const t) |
bool | isFieldEmpty (case_t const bc) const |
bool | isFieldEmpty (column_t const iColumn, rank_t const iRank) const |
virtual void | setCapture (piece_t const p, case_t const c) |
Clear castle flag if rook captured update piece counter, update hash, clear field. More... | |
bFen | getFEN () const |
std::string | getHashStr () const |
Protected Member Functions | |
bBasicBoard () | |
bBasicBoard (bFen const &fen) | |
virtual | ~bBasicBoard () |
bBasicBoard (bBasicBoard const &)=default | |
bBasicBoard (bBasicBoard &&)=default | |
bBasicBoard & | operator= (bBasicBoard const &)=delete |
bBasicBoard & | operator= (bBasicBoard &&)=delete |
void | setPieceKU (case_t const bc, piece_t const piece) |
used for setboard only More... | |
case_t | getWhiteKingPos () const |
case_t | getBlackKingPos () const |
void | calcHash () |
Set hash based on board position, also calc pieces Byte 0: bits 4-6 capture count (masked) bit 7 player to move We are using 64 bits for hash. More... | |
hashkey_t | getHash () const |
calculate and set hash More... | |
Protected Attributes | |
hashkey_t | m_hash |
piece_t | m_capturedpiece = tPiece::P_EMPTY |
|
protected |
|
explicitprotected |
Definition at line 21 of file board.cpp.
|
protecteddefault |
|
protecteddefault |
|
protecteddelete |
|
protecteddelete |
|
inline |
Definition at line 54 of file board.h.
Referenced by bBasicBoard(), and bBoard::invert().
|
inline |
Definition at line 55 of file board.h.
Referenced by bBasicBoard(), and bBoard::invert().
|
inline |
Definition at line 57 of file board.h.
Referenced by calcHash(), bWhitePawn::GenerateMoves(), bBlackPawn::GenerateMoves(), and getFEN().
void bBasicBoard::setEp | ( | case_t const | e | ) |
Definition at line 184 of file board.cpp.
Referenced by bBasicBoard().
|
inline |
Definition at line 59 of file board.h.
Referenced by getFEN(), and bPositionEvaluation::isGameEnded().
|
inline |
Definition at line 60 of file board.h.
Referenced by bBasicBoard(), and setCapture().
bool bBasicBoard::canCastle | ( | uint8_t const | f | ) | const |
Definition at line 194 of file board.cpp.
Referenced by calcHash(), clearCastle(), bWhiteKing::GenerateMoves(), bBlackKing::GenerateMoves(), getFEN(), and bBoard::invert().
void bBasicBoard::setCastle | ( | uint8_t const | f, |
bool const | c | ||
) |
Definition at line 199 of file board.cpp.
Referenced by bBasicBoard(), clearCastle(), and bBoard::invert().
void bBasicBoard::clearCastle | ( | uint8_t const | f | ) |
Definition at line 208 of file board.cpp.
Referenced by setCapture().
|
inline |
Definition at line 67 of file board.h.
Referenced by bBoard::invert(), bPositionEvaluation::isGameEnded(), bBoard::minimizing(), bGame::playGameMove(), bGame::playUIsuppliedMove(), and bSearchAlgorithm::SearchBestMove().
|
inline |
|
inline |
Definition at line 69 of file board.h.
Referenced by calcHash(), bMoveList::generateAtLeastOneMove(), bMoveList::generateAtLeastOneQSMove(), bMoveList::generateEscapeKingMove(), bMoveList::generateMoves(), and getFEN().
1 for white, 2 for black
Definition at line 138 of file board.cpp.
Referenced by bPawn::addCapturePawnMove(), bPawn::addCapturePromotionMove(), bPiece::addMove(), bPiece::addMoves(), calcHash(), bMoveList::generateAtLeastOneMove(), bMoveList::generateAtLeastOneQSMove(), bMoveList::generateEscapeKingMove(), bMoveList::generateMoves(), PosEvalStaticBoard::getEndgameEvaluation(), getFEN(), PosEvalStaticBoard::getMatingEvaluation(), PosEvalStaticBoard::getRelativeBoardEval(), bBoard::invert(), bPieceColour::isAttackedBySlider(), and bKing::kingSeesRook().
retrieve piece with bounds checking, return field empty in case of out of bounds
Definition at line 152 of file board.cpp.
Referenced by bPieceColour::isAttackedByPiece().
bool bBasicBoard::isFieldEmpty | ( | case_t const | bc | ) | const |
Definition at line 159 of file board.cpp.
Referenced by bPiece::addMove(), bPiece::addMoves(), bPawn::addNonCaptureDoublePawnMove(), bPawn::addNonCapturePawnMove(), bPawn::addNonCapturePromotionMove(), bWhitePawn::GenerateMoves(), and bBlackPawn::GenerateMoves().
Clear castle flag if rook captured update piece counter, update hash, clear field.
Reimplemented in bBoard.
Definition at line 221 of file board.cpp.
Referenced by bBoard::setCapture().
bFen bBasicBoard::getFEN | ( | ) | const |
Definition at line 92 of file board.cpp.
Referenced by bel_debug::execute().
used for setboard only
Definition at line 177 of file board.cpp.
Referenced by bBasicBoard(), and bBoard::invert().
|
inlineprotected |
Definition at line 90 of file board.h.
Referenced by bMoveList::generateEscapeKingMove(), and bPositionEvaluation::isGameEnded().
|
inlineprotected |
Definition at line 91 of file board.h.
Referenced by bMoveList::generateEscapeKingMove(), and bPositionEvaluation::isGameEnded().
|
protected |
Set hash based on board position, also calc pieces Byte 0: bits 4-6 capture count (masked) bit 7 player to move We are using 64 bits for hash.
Definition at line 279 of file board.cpp.
Referenced by bBasicBoard(), and bBoard::invert().
|
inlineprotected |
|
protected |
Definition at line 95 of file board.h.
Referenced by calcHash(), clearCastle(), getHash(), getHashStr(), moveBlackKing(), movePiece(), moveWhiteKing(), setCapture(), setEp(), and swapPiece().
|
protected |
Definition at line 96 of file board.h.
Referenced by bBoard::isCapture(), and bBoard::setCapture().