Belofte  version 2.1.5
A promising chess program using the UCI or Winboard interface
bWhitePiece Class Reference

Public Member Functions

 bWhitePiece ()
 
 ~bWhitePiece () override
 
bool isAttacked (bBoard const &b, case_t const &cf) const override
 Check if piece on position is attacked, start with piece always on board and then with pieces with greatest mobility, goal is to break ou asap. More...
 
- Public Member Functions inherited from bPieceColour
 bPieceColour (side_t s)
 
virtual ~bPieceColour ()
 
 bPieceColour (bPieceColour const &)=delete
 
 bPieceColour (bPieceColour &&)=delete
 
bPieceColouroperator= (bPieceColour const &)=delete
 
bPieceColouroperator= (bPieceColour &&)=delete
 
bool isWhite () const
 
bool isBlack () const
 
bool isEmpty () const
 
side_t invert ()
 
side_t opponent () const
 
side_t toMove () const
 

Additional Inherited Members

- Protected Member Functions inherited from bPieceColour
bool isAttackedByPiece (bBoard const &b, case_t const &cf, piece_t const cPiece, int8_t const ri, int8_t const ci) const
 Return true if position is attacked by opponent respecting move offsets. More...
 
bool isAttackedBySlider (bBoard const &b, case_t const &cf, piece_t const cPiece, piece_t const cPiece2, int8_t const ri, int8_t const ci) const
 Return true if position is attacked by opponent respecting move offsets. More...
 
- Protected Attributes inherited from bPieceColour
side_t m_side = tSide::SIDE_UNDEFINED
 

Detailed Description

Definition at line 175 of file piece.h.

Constructor & Destructor Documentation

◆ bWhitePiece()

bWhitePiece::bWhitePiece ( )

Definition at line 264 of file piece.cpp.

◆ ~bWhitePiece()

bWhitePiece::~bWhitePiece ( )
override

Definition at line 269 of file piece.cpp.

Member Function Documentation

◆ isAttacked()

bool bWhitePiece::isAttacked ( bBoard const &  b,
case_t const &  cf 
) const
overridevirtual

Check if piece on position is attacked, start with piece always on board and then with pieces with greatest mobility, goal is to break ou asap.

Parameters
bboard
cfpiece position
Returns
true if attacked, false if not
Todo:
TOCHECK how about ep

Implements bPieceColour.

Definition at line 178 of file piece.cpp.

Referenced by bWhiteKing::GenerateMoves(), and bPositionEvaluation::isGameEnded().

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