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

#include <move.h>

+ Inheritance diagram for bMove:
+ Collaboration diagram for bMove:

Public Member Functions

 bMove ()
 
 bMove (bMove const &m)
 
 bMove (bMove &&m)
 
 bMove (case_t cf, case_t ct)
 
 bMove (bmove_t const bmt)
 
 ~bMove () override
 
bMoveoperator= (bMove const &m)
 
bMoveoperator= (bMove &&m)
 
bool operator> (bMove const &r) const
 
bool isMateMove () const
 Check if end of game flag is set, and not forced draw.
 
constexpr bScore getScore () const
 
bScore realScore () const
 
void setScore (bScore const score)
 
constexpr bScore getAbsScore () const
 
constexpr bool isDrawScore () const
 
constexpr bool isUndefinedScore () const
 
void clearScore ()
 
std::string getMoveEvalStr () const
 
- Public Member Functions inherited from bBasicMove
 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
 

Detailed Description

Definition at line 13 of file move.h.

Constructor & Destructor Documentation

◆ bMove() [1/5]

bMove::bMove ( )
inlineexplicit

Definition at line 15 of file move.h.

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

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

◆ bMove() [2/5]

bMove::bMove ( bMove const & m)
inline

Definition at line 18 of file move.h.

+ Here is the call graph for this function:

◆ bMove() [3/5]

bMove::bMove ( bMove && m)
inlineexplicit

Definition at line 22 of file move.h.

+ Here is the call graph for this function:

◆ bMove() [4/5]

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

Definition at line 26 of file move.h.

+ Here is the call graph for this function:

◆ bMove() [5/5]

bMove::bMove ( bmove_t const bmt)
inlineexplicit

Definition at line 29 of file move.h.

+ Here is the call graph for this function:

◆ ~bMove()

bMove::~bMove ( )
inlineoverride

Definition at line 32 of file move.h.

Member Function Documentation

◆ operator=() [1/2]

bMove & bMove::operator= ( bMove const & m)
inline

Definition at line 35 of file move.h.

+ Here is the call graph for this function:

◆ operator=() [2/2]

bMove & bMove::operator= ( bMove && m)
inline

Definition at line 40 of file move.h.

+ Here is the call graph for this function:

◆ operator>()

bool bMove::operator> ( bMove const & r) const
inline

Definition at line 46 of file move.h.

+ Here is the call graph for this function:

◆ isMateMove()

bool bMove::isMateMove ( ) const

Check if end of game flag is set, and not forced draw.

Returns
true if game ended by mate

Definition at line 41 of file move.cpp.

Referenced by getMoveEvalStr().

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

◆ getScore()

bScore bMove::getScore ( ) const
inlineconstexpr

Definition at line 51 of file move.h.

◆ realScore()

bScore bMove::realScore ( ) const
inline

Definition at line 53 of file move.h.

Referenced by operator>().

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

◆ setScore()

void bMove::setScore ( bScore const score)
inline

Definition at line 55 of file move.h.

◆ getAbsScore()

bScore bMove::getAbsScore ( ) const
inlineconstexpr

Definition at line 57 of file move.h.

Referenced by isMateMove().

+ Here is the caller graph for this function:

◆ isDrawScore()

bool bMove::isDrawScore ( ) const
inlineconstexpr

Definition at line 59 of file move.h.

Referenced by getMoveEvalStr(), and isMateMove().

+ Here is the caller graph for this function:

◆ isUndefinedScore()

bool bMove::isUndefinedScore ( ) const
inlineconstexpr

Definition at line 61 of file move.h.

Referenced by getMoveEvalStr(), and isMateMove().

+ Here is the caller graph for this function:

◆ clearScore()

void bMove::clearScore ( )
inline

Definition at line 63 of file move.h.

◆ getMoveEvalStr()

std::string bMove::getMoveEvalStr ( ) const
Todo
convert to move annotation to be used in PgnMove as well

Definition at line 17 of file move.cpp.

Referenced by bMoveList::operator<<.

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