tartan 1.2.2.1
Chess API
Loading...
Searching...
No Matches
tt::chess::ex::checkmate Class Reference

Thrown when turn cannot be perfomred because of King is under checkmate. More...

#include <exceptions.hpp>

Inheritance diagram for tt::chess::ex::checkmate:
[legend]
Collaboration diagram for tt::chess::ex::checkmate:
[legend]

Public Member Functions

 checkmate (const Piece *p, const Piece::Position &to, const Piece *k, const std::string &what_arg="King is under checkmate")
 
- Public Member Functions inherited from tt::chess::ex::check
 check (const Piece *p, const Piece::Position &to, const Piece *k, const std::string &what_arg="King is under check after move")
 
const Pieceking () const
 Get the King object.
 
- Public Member Functions inherited from tt::ex::illegal_move
 illegal_move (const Piece *p, const Piece::Position &to, const std::string &what_arg="Illegal move")
 
const Piecepiece () const
 Get Piece object.
 
const Piece::Positionto () const
 Get move target location.
 
- Public Member Functions inherited from std::logic_error
logic_error (T... args)
 
what (T... args)
 
- Public Member Functions inherited from std::exception
what (T... args)
 
~exception (T... args)
 
operator= (T... args)
 
exception (T... args)
 

Detailed Description

Thrown when turn cannot be perfomred because of King is under checkmate.

See also
tt::chess::King::checkmate()

Constructor & Destructor Documentation

◆ checkmate()

tt::chess::ex::checkmate::checkmate ( const Piece p,
const Piece::Position to,
const Piece k,
const std::string what_arg = "King is under checkmate" 
)
inline
Parameters
kpointer to endangered King object

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