tartan  1.2.1.0
tt::chess::Bishop::Turn Class Reference

Bishop Turn. More...

#include <chess.hpp>

Inheritance diagram for tt::chess::Bishop::Turn:
[legend]
Collaboration diagram for tt::chess::Bishop::Turn:
[legend]

Public Member Functions

bool isEqual (const Piece::Turn &) const override
 Compare turns. More...
 
- Public Member Functions inherited from tt::Piece::Turn
 Turn (const Piece *tpiece, const Position &to, const Piece *cap=nullptr, bool possible=true)
 Construct new Turn object. More...
 
Position to () const
 Position where piece will end up after turn. More...
 
Position from () const
 Position the turn is started at. More...
 
const Piecepiece () const
 Turn Piece. More...
 
Piecepiece ()
 Turn Piece. More...
 
const Piececapture () const
 Captured piece. More...
 
Piececapture ()
 Captured piece. More...
 
bool possible () const
 Turn viability. More...
 
bool setPossible (bool c)
 Set the turn viability. More...
 
virtual std::string str () const
 String Turn representation. More...
 
virtual void apply (int mode=0)
 Apply turn. More...
 
virtual void undo ()
 Undo turn. More...
 
virtual auto clone () const -> std::decay< decltype(*this)>::type *
 Clone current Turn. More...
 

Additional Inherited Members

- Protected Attributes inherited from tt::Piece::Turn
Position t_from
 Turn piece starting position
 
Position t_to
 Turn piece finishing position
 
Piecet_piece
 Turn Piece inself
 
Piecet_capture
 Piece that is captured as the resul of turn.
 
bool t_possible
 Turn viability.
 

Detailed Description

Bishop Turn.

Nothing special from Piece::Turn here. This is just defined to use it with RTTI to differentiate Piece::Turn pointers.

Member Function Documentation

◆ isEqual()

bool tt::chess::Bishop::Turn::isEqual ( const Piece::Turn rhs) const
overridevirtual

Compare turns.

Should be reimplemented in child Piece class if it's Turn logic differs.

Parameters
rhsTurn object compare to
Returns
true if rhs turn is the same as current object

Reimplemented from tt::Piece::Turn.


The documentation for this class was generated from the following file: