Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
|
#include <movelist.h>
Public Member Functions | |
bMoveList () | |
bMoveList (bMoveList &&) noexcept | |
bMoveList (bBoard const &b) | |
~bMoveList () | |
bMoveList (bMoveList const &)=delete | |
bMoveList & | operator= (bMoveList const &)=delete |
bMoveList & | operator= (bMoveList &&)=delete |
movenum_t | generateMoves (bBoard const &b) |
generate moves if not yet generated | |
void | emptyMoveList () |
bool | atLeastOneMovePossible (bBoard const &b) const |
see if at least one move can be played e.g. | |
movenum_t | getNumberOfMoves () const |
movenum_t | getNumberOfQSMoves () const |
return number of non silent moves | |
bMove const & | operator[] (movenum_t const moveid) const |
basicmove_t | getMoveT (movenum_t const moveid) const |
movenum_t | addWhiteMoveIfValid (bBoard const &b, bMove const &m) |
Only add move to movelist if valid. | |
movenum_t | addWhiteCaptureIfValid (bBoard const &b, case_t const &cf, case_t const &to) |
movenum_t | addBlackMoveIfValid (bBoard const &b, bMove const &m) |
Only add move to movelist if valid. | |
movenum_t | addBlackCaptureIfValid (bBoard const &b, case_t const &cf, case_t const &to) |
movenum_t | addWhitePromotionIfValid (bBoard const &b, bMove const &m) |
Only add move to movelist if valid. | |
movenum_t | addBlackPromotionIfValid (bBoard const &b, bMove const &m) |
Only add move to movelist if valid. | |
movenum_t | setScoreOfMove (movenum_t const moveid, bScore const score) |
Store score of move. | |
movenum_t | sortMoves () |
Protected Attributes | |
movelist_t | m_lmoves |
Friends | |
std::ostream & | operator<< (std::ostream &os, bMoveList const &ml) |
Definition at line 15 of file movelist.h.
bMoveList::bMoveList | ( | ) |
Definition at line 10 of file movelist.cpp.
|
explicitnoexcept |
|
explicit |
bMoveList::~bMoveList | ( | ) |
Definition at line 21 of file movelist.cpp.
|
delete |
generate moves if not yet generated
Definition at line 259 of file movelist.cpp.
Referenced by bBoard::bBoard(), bMoveList(), bPgnMoveList::bPgnMoveList(), SearchRandom::CalcBestMove(), SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), bel_debug::execute(), SearchAlphaBeta::Quiescence(), and bSearchAlgorithm::SearchBestMove().
void bMoveList::emptyMoveList | ( | ) |
Definition at line 284 of file movelist.cpp.
Referenced by bGame::revertGameMove().
bool bMoveList::atLeastOneMovePossible | ( | bBoard const & | b | ) | const |
see if at least one move can be played e.g.
(stale-)mate eval
Definition at line 296 of file movelist.cpp.
Referenced by bBoard::atLeastOneMovePossible().
movenum_t bMoveList::getNumberOfMoves | ( | ) | const |
Definition at line 332 of file movelist.cpp.
Referenced by bPgnMove::bPgnMove(), SearchEvalPosOnly::CalcBestMove(), and bGame::playGameMove().
movenum_t bMoveList::getNumberOfQSMoves | ( | ) | const |
return number of non silent moves
Definition at line 339 of file movelist.cpp.
Referenced by SearchAlphaBeta::Quiescence().
Definition at line 322 of file movelist.cpp.
basicmove_t bMoveList::getMoveT | ( | movenum_t const | moveid | ) | const |
Definition at line 327 of file movelist.cpp.
Referenced by bPgnMove::bPgnMove().
Only add move to movelist if valid.
b | board on which move is calculated |
m | move to be added |
Definition at line 79 of file movelist.cpp.
Referenced by bWhitePawn::addEPMove(), bWhitePiece::addMove(), bWhitePiece::addMoves(), bWhitePawn::addNonCaptureDoublePawnMove(), bWhitePawn::addNonCapturePawnMove(), addWhiteCaptureIfValid(), and bWhiteKing::GenerateMoves().
movenum_t bMoveList::addWhiteCaptureIfValid | ( | bBoard const & | b, |
case_t const & | cf, | ||
case_t const & | to | ||
) |
Definition at line 89 of file movelist.cpp.
Referenced by bWhitePawn::addCapturePawnMove(), bWhitePiece::addMove(), and bWhitePiece::addMoves().
Only add move to movelist if valid.
b | board on which move is calculated |
m | move to be added |
Definition at line 102 of file movelist.cpp.
Referenced by addBlackCaptureIfValid(), bBlackPawn::addEPMove(), bBlackPiece::addMove(), bBlackPiece::addMoves(), bBlackPawn::addNonCaptureDoublePawnMove(), bBlackPawn::addNonCapturePawnMove(), and bBlackKing::GenerateMoves().
movenum_t bMoveList::addBlackCaptureIfValid | ( | bBoard const & | b, |
case_t const & | cf, | ||
case_t const & | to | ||
) |
Definition at line 112 of file movelist.cpp.
Referenced by bBlackPawn::addCapturePawnMove(), bBlackPiece::addMove(), and bBlackPiece::addMoves().
Only add move to movelist if valid.
b | board on which move is calculated |
m | move to be added |
Definition at line 125 of file movelist.cpp.
Referenced by bWhitePawn::addCapturePromotionMove(), and bWhitePawn::addNonCapturePromotionMove().
Only add move to movelist if valid.
b | board on which move is calculated |
m | move to be added |
Definition at line 165 of file movelist.cpp.
Referenced by bBlackPawn::addCapturePromotionMove(), and bBlackPawn::addNonCapturePromotionMove().
Store score of move.
moveid | of move to be stored [1 -> max number of moves] |
score | to be stored |
Definition at line 207 of file movelist.cpp.
Referenced by SearchEvalPosOnly::CalcBestMove(), SearchRandom::CalcBestMove(), SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), and SearchAlphaBeta::Quiescence().
movenum_t bMoveList::sortMoves | ( | ) |
Definition at line 225 of file movelist.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchAlphaBetaFH::CalcBestMove(), SearchAlphaBeta::Quiescence(), and bSearchAlgorithm::SearchBestMove().
|
friend |
Definition at line 346 of file movelist.cpp.
|
protected |
Definition at line 49 of file movelist.h.
Referenced by atLeastOneMovePossible(), emptyMoveList(), generateMoves(), getMoveT(), getNumberOfMoves(), operator[](), setScoreOfMove(), sortMoves(), and ~bMoveList().