King chess Piece.
More...
#include <chess.hpp>
◆ castled()
bool tt::chess::King::castled |
( |
| ) |
const |
|
inline |
Has the King object already performed the castling Turn.
- Returns
true
if King object have done castling already, false
otherwise
◆ check()
bool tt::chess::King::check |
( |
| ) |
const |
Check if a King is under check.
- Returns
true
if King object is under check, false
otherwise
◆ checkmate()
bool tt::chess::King::checkmate |
( |
| ) |
const |
Check if a King is under checkmate.
- Returns
true
if King object is under checkmate, false
otherwise
◆ moveMap()
TurnMap tt::chess::King::moveMap |
( |
int |
mode = 0 | ) |
const |
|
overridevirtual |
Generic moves.
- Note
- Developer had and intention that You will define unscoped enumeration for
mode
in Your Board class. It's value will be passed to function and influence it's behaivor in some way.
- Parameters
-
mode | optional mode constant to influence the moveMap() behaivor in child classes.
|
- Returns
- TurnMap object filled with Turn objects. May not contain turns that are not possible because of piece placement
Implements tt::Piece.
◆ Piece()
tt::Piece::Piece |
( |
const Position & |
pos = {1,1} , |
|
|
Color |
col = Color::White |
|
) |
| |
The documentation for this class was generated from the following files:
- chess/include/tartan/chess/chess.hpp
- chess/pieces/king/king.cpp