tartan 1.2.2.1
Chess API
|
#include <chess.hpp>
Classes | |
class | Turn |
Pawn Turn. More... | |
Public Member Functions | |
virtual TurnMap | moveMap (int mode=0) const override |
Moves of a Pawn object. | |
Piece (const Position &pos={1, 1}, Color col=Color::White) | |
Construct new Piece. | |
Public Member Functions inherited from tt::Piece | |
Color | color () const |
Piece color. | |
Color | setColor (Color col) |
Set the color. | |
const Position & | position () const |
Piece Position. | |
Position & | position () |
Piece Position. | |
Position | setPosition (const Position &) |
Set Piece position. | |
virtual Position | move (const Position &to) |
Move piece. | |
const Board * | board () const |
Piece board. | |
Board * | board () |
Piece board. | |
Board * | setBoard (Board *b) |
Set Piece Board. | |
std::size_t | movesMade () const |
Moves count. | |
std::size_t | turnIndex () const |
Current turn index. | |
Piece (const Position &pos={1, 1}, Color col=Color::White) | |
Construct new Piece. | |
Additional Inherited Members | |
Public Types inherited from tt::Piece | |
enum class | Color { Black = 0 , White = 1 } |
Piece color. More... | |
Static Public Member Functions inherited from tt::Piece | |
static TurnMap | diagonalMoves (const Piece *p) |
Construct diagonal moves TurnMap. | |
static TurnMap | straightMoves (const Piece *p) |
Construct straight moves (up, down, left, right) TurnMap. | |
Protected Attributes inherited from tt::Piece | |
Color | p_color |
Piece color. | |
Position | p_position |
Piece Position. | |
Board * | p_board = nullptr |
Piece Board. | |
std::size_t | p_movesMade = 0 |
Turns count Count of turns Piece have made. | |
std::size_t | p_turnIndex = 0 |
Last turn index. | |
|
overridevirtual |
Moves of a Pawn object.
Method describes moves on a current Chessboard object.
Implements tt::Piece.