Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
bBasicMove Class Reference

basicmove More...

#include <basicmove.h>

+ Inheritance diagram for bBasicMove:

Public Member Functions

 bBasicMove ()
 
 bBasicMove (bBasicMove const &bm)
 
 bBasicMove (bBasicMove &&bm)
 
 bBasicMove (bmove_t const bmt)
 
 bBasicMove (case_t cf, case_t ct)
 
virtual ~bBasicMove ()
 
bBasicMoveoperator= (bBasicMove const &bm)
 
bBasicMoveoperator= (bBasicMove &&bm)
 
constexpr bool operator== (bBasicMove const &r) const
 
bool operator== (bmove_t const &r) const
 
constexpr case_t from () const
 
constexpr case_t to () const
 
constexpr rank_t fromrank () const
 
constexpr column_t fromcolumn () const
 
constexpr rank_t torank () const
 
constexpr column_t tocolumn () const
 
constexpr fromto_t getFromTo () const
 
constexpr bmove_t getBMoveT () const
 
constexpr ppiece_t getPromotion () const
 
constexpr bool isValid () const
 
constexpr bool isNullMove () const
 
constexpr bool isPromotion () const
 
constexpr bool isMajorPromotion () const
 
void setPromotion (const ppiece_t p)
 
piece_t getWhitePromotionPiece () const
 
piece_t getBlackPromotionPiece () const
 
constexpr bool isCapture () const
 
void setCapture ()
 
constexpr bool isPawnMove () const
 
void setPawnMove ()
 
constexpr bool isCastleMove () const
 
void setShortCastleMove ()
 
void setLongCastleMove ()
 
constexpr bool isLongCastleMove () const
 
constexpr bool isCheck () const
 
void setCheck ()
 
void clearIsCheck ()
 
constexpr bool getGameEnd () const
 
void setGameEnd ()
 
constexpr bool isEPPossible () const
 
void setEPPossible ()
 
constexpr bool isEPMove () const
 
void setEPMove ()
 
constexpr bool isNonSilent () const
 
 operator std::string () const
 

Friends

std::ostream & operator<< (std::ostream &os, bBasicMove const &m)
 

Detailed Description

basicmove

Definition at line 12 of file basicmove.h.

Constructor & Destructor Documentation

◆ bBasicMove() [1/5]

bBasicMove::bBasicMove ( )
inlineexplicit

◆ bBasicMove() [2/5]

bBasicMove::bBasicMove ( bBasicMove const & bm)
inlineexplicit

Definition at line 16 of file basicmove.h.

+ Here is the call graph for this function:

◆ bBasicMove() [3/5]

bBasicMove::bBasicMove ( bBasicMove && bm)
inlineexplicit

Definition at line 19 of file basicmove.h.

+ Here is the call graph for this function:

◆ bBasicMove() [4/5]

bBasicMove::bBasicMove ( bmove_t const bmt)
inlineexplicit

Definition at line 22 of file basicmove.h.

◆ bBasicMove() [5/5]

bBasicMove::bBasicMove ( case_t cf,
case_t ct )
inlineexplicit

Definition at line 25 of file basicmove.h.

◆ ~bBasicMove()

virtual bBasicMove::~bBasicMove ( )
inlinevirtual

Definition at line 30 of file basicmove.h.

Member Function Documentation

◆ operator=() [1/2]

bBasicMove & bBasicMove::operator= ( bBasicMove const & bm)
inline

Definition at line 33 of file basicmove.h.

Referenced by bMove::operator=(), and bMove::operator=().

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

◆ operator=() [2/2]

bBasicMove & bBasicMove::operator= ( bBasicMove && bm)
inline

Definition at line 37 of file basicmove.h.

+ Here is the call graph for this function:

◆ operator==() [1/2]

bool bBasicMove::operator== ( bBasicMove const & r) const
inlineconstexpr

Definition at line 42 of file basicmove.h.

Referenced by bCoordMove::operator==().

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

◆ operator==() [2/2]

bool bBasicMove::operator== ( bmove_t const & r) const
inline

Definition at line 48 of file basicmove.h.

+ Here is the call graph for this function:

◆ from()

case_t bBasicMove::from ( ) const
inlineconstexpr

Definition at line 56 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), and bBasicBoard::unApplyMove().

+ Here is the caller graph for this function:

◆ to()

case_t bBasicMove::to ( ) const
inlineconstexpr

◆ fromrank()

rank_t bBasicMove::fromrank ( ) const
inlineconstexpr

Definition at line 61 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), and bBasicBoard::applyWhiteMove().

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

◆ fromcolumn()

column_t bBasicMove::fromcolumn ( ) const
inlineconstexpr

Definition at line 63 of file basicmove.h.

+ Here is the call graph for this function:

◆ torank()

rank_t bBasicMove::torank ( ) const
inlineconstexpr

Definition at line 65 of file basicmove.h.

+ Here is the call graph for this function:

◆ tocolumn()

column_t bBasicMove::tocolumn ( ) const
inlineconstexpr

Definition at line 67 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), and bBasicBoard::unApplyMove().

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

◆ getFromTo()

fromto_t bBasicMove::getFromTo ( ) const
inlineconstexpr

Definition at line 70 of file basicmove.h.

Referenced by bBoard::applyMove(), and bGame::playGameMove().

+ Here is the caller graph for this function:

◆ getBMoveT()

bmove_t bBasicMove::getBMoveT ( ) const
inlineconstexpr

Definition at line 72 of file basicmove.h.

Referenced by bEpd::parseEpdPosition(), bEpd::parseSTSPosition(), and engineInterface::sendMove().

+ Here is the caller graph for this function:

◆ getPromotion()

ppiece_t bBasicMove::getPromotion ( ) const
inlineconstexpr

Definition at line 74 of file basicmove.h.

◆ isValid()

bool bBasicMove::isValid ( ) const
inlineconstexpr

Definition at line 77 of file basicmove.h.

◆ isNullMove()

bool bBasicMove::isNullMove ( ) const
inlineconstexpr

Definition at line 79 of file basicmove.h.

◆ isPromotion()

bool bBasicMove::isPromotion ( ) const
inlineconstexpr

Definition at line 82 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), isNonSilent(), and bBasicBoard::unApplyMove().

+ Here is the caller graph for this function:

◆ isMajorPromotion()

bool bBasicMove::isMajorPromotion ( ) const
inlineconstexpr

Definition at line 84 of file basicmove.h.

◆ setPromotion()

void bBasicMove::setPromotion ( const ppiece_t p)
inline

Definition at line 86 of file basicmove.h.

Referenced by bMoveList::addBlackPromotionIfValid(), and bMoveList::addWhitePromotionIfValid().

+ Here is the caller graph for this function:

◆ getWhitePromotionPiece()

piece_t bBasicMove::getWhitePromotionPiece ( ) const

Definition at line 19 of file basicmove.cpp.

Referenced by bBasicBoard::applyWhiteMove().

+ Here is the caller graph for this function:

◆ getBlackPromotionPiece()

piece_t bBasicMove::getBlackPromotionPiece ( ) const

Definition at line 33 of file basicmove.cpp.

Referenced by bBasicBoard::applyBlackMove().

+ Here is the caller graph for this function:

◆ isCapture()

bool bBasicMove::isCapture ( ) const
inlineconstexpr

Definition at line 93 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), bMove::getMoveEvalStr(), and isNonSilent().

+ Here is the caller graph for this function:

◆ setCapture()

◆ isPawnMove()

bool bBasicMove::isPawnMove ( ) const
inlineconstexpr

Definition at line 97 of file basicmove.h.

◆ setPawnMove()

◆ isCastleMove()

bool bBasicMove::isCastleMove ( ) const
inlineconstexpr

Definition at line 101 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), and bBasicBoard::unApplyMove().

+ Here is the caller graph for this function:

◆ setShortCastleMove()

void bBasicMove::setShortCastleMove ( )
inline

Definition at line 103 of file basicmove.h.

Referenced by bBlackKing::GenerateMoves(), and bWhiteKing::GenerateMoves().

+ Here is the caller graph for this function:

◆ setLongCastleMove()

void bBasicMove::setLongCastleMove ( )
inline

Definition at line 105 of file basicmove.h.

Referenced by bBlackKing::GenerateMoves(), and bWhiteKing::GenerateMoves().

+ Here is the caller graph for this function:

◆ isLongCastleMove()

bool bBasicMove::isLongCastleMove ( ) const
inlineconstexpr

Definition at line 107 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), and bBasicBoard::unApplyMove().

+ Here is the caller graph for this function:

◆ isCheck()

bool bBasicMove::isCheck ( ) const
inlineconstexpr

Definition at line 109 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), bMove::getMoveEvalStr(), and bMove::isMateMove().

+ Here is the caller graph for this function:

◆ setCheck()

void bBasicMove::setCheck ( )
inline

Definition at line 111 of file basicmove.h.

◆ clearIsCheck()

void bBasicMove::clearIsCheck ( )
inline

Definition at line 113 of file basicmove.h.

Referenced by bMoveList::addBlackPromotionIfValid(), and bMoveList::addWhitePromotionIfValid().

+ Here is the caller graph for this function:

◆ getGameEnd()

bool bBasicMove::getGameEnd ( ) const
inlineconstexpr

Definition at line 115 of file basicmove.h.

Referenced by bMove::isMateMove().

+ Here is the caller graph for this function:

◆ setGameEnd()

void bBasicMove::setGameEnd ( )
inline

Definition at line 117 of file basicmove.h.

◆ isEPPossible()

bool bBasicMove::isEPPossible ( ) const
inlineconstexpr

Definition at line 120 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), and bBasicBoard::applyWhiteMove().

+ Here is the caller graph for this function:

◆ setEPPossible()

void bBasicMove::setEPPossible ( )
inline

Definition at line 122 of file basicmove.h.

Referenced by bBlackPawn::addNonCapturePawnMove(), and bWhitePawn::addNonCapturePawnMove().

+ Here is the caller graph for this function:

◆ isEPMove()

bool bBasicMove::isEPMove ( ) const
inlineconstexpr

Definition at line 126 of file basicmove.h.

Referenced by bBasicBoard::applyBlackMove(), bBasicBoard::applyWhiteMove(), bMove::getMoveEvalStr(), isNonSilent(), and bBasicBoard::unApplyMove().

+ Here is the caller graph for this function:

◆ setEPMove()

void bBasicMove::setEPMove ( )
inline

Definition at line 128 of file basicmove.h.

Referenced by bBlackPawn::addEPMove(), and bWhitePawn::addEPMove().

+ Here is the caller graph for this function:

◆ isNonSilent()

bool bBasicMove::isNonSilent ( ) const
inlineconstexpr

Definition at line 133 of file basicmove.h.

Referenced by SearchAlphaBeta::Quiescence().

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

◆ operator std::string()

bBasicMove::operator std::string ( ) const

Definition at line 12 of file basicmove.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
bBasicMove const & m )
friend

Definition at line 62 of file basicmove.cpp.

Member Data Documentation

◆ u_bmove

bmove_t bBasicMove::u_bmove = 0UL

◆ m_fromto

fromto_t bBasicMove::m_fromto

Definition at line 143 of file basicmove.h.

Referenced by getFromTo(), isNullMove(), isValid(), operator==(), and operator==().

◆ m_from

case_t bBasicMove::m_from

Definition at line 145 of file basicmove.h.

Referenced by bBasicMove(), from(), fromcolumn(), fromrank(), and operator std::string().

◆ m_to

case_t bBasicMove::m_to

Definition at line 146 of file basicmove.h.

Referenced by bBasicMove(), operator std::string(), to(), tocolumn(), and torank().

◆ m_decoration

uint16_t bBasicMove::m_decoration

Definition at line 150 of file basicmove.h.

Referenced by bBasicMove().

◆ m_flag

◆ m_promotion