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

Thrown when turn cannot be perfomred because of King beeing in check. More...

#include <exceptions.hpp>

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

Public Member Functions

 check (const Piece *p, const Piece::Position &to, const Piece *k, const std::string &what_arg="King is under check after move")
 
const Piece * king () 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 Piece * piece () const
 Get Piece object.
 
const Piece::Position & to () const
 Get move target location.
 
- Public Member Functions inherited from std::logic_error
T logic_error (T... args)
 
T what (T... args)
 
- Public Member Functions inherited from std::exception
T what (T... args)
 
T ~exception (T... args)
 
T operator= (T... args)
 
T exception (T... args)
 

Detailed Description

Thrown when turn cannot be perfomred because of King beeing in check.

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

Constructor & Destructor Documentation

◆ check()

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" 
)
inline
Parameters
kpointer to endangered King object

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