|
tartan 1.2.2.1
Chess API
|
#include <chess.hpp>
Public Member Functions | |
| bool | isEqual (const Piece::Turn &) const override |
| Compare turns. | |
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. | |
| Position | to () const |
| Position where piece will end up after turn. | |
| Position | from () const |
| Position the turn is started at. | |
| const Piece * | piece () const |
| Turn Piece. | |
| Piece * | piece () |
| Turn Piece. | |
| const Piece * | capture () const |
| Captured piece. | |
| Piece * | capture () |
| Captured piece. | |
| bool | possible () const |
| Turn viability. | |
| bool | setPossible (bool c) |
| Set the turn viability. | |
| virtual std::string | str () const |
| String Turn representation. | |
| virtual void | apply (int mode=0) |
| Apply turn. | |
| virtual void | undo () |
| Undo turn. | |
| virtual auto | clone () const -> std::decay< decltype(*this)>::type * |
| Clone current Turn. | |
Additional Inherited Members | |
Protected Attributes inherited from tt::Piece::Turn | |
| Position | t_from |
| Turn piece starting position | |
| Position | t_to |
| Turn piece finishing position | |
| Piece * | t_piece |
| Turn Piece inself | |
| Piece * | t_capture |
| Piece that is captured as the resul of turn. | |
| bool | t_possible |
| Turn viability. | |
Nothing special from Piece::Turn here. This is just defined to use it with RTTI to differentiate Piece::Turn pointers.
|
overridevirtual |
Compare turns.
Should be reimplemented in child Piece class if it's Turn logic differs.
| rhs | Turn object compare to |
true if rhs turn is the same as current object Reimplemented from tt::Piece::Turn.