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

Thrown when piece moved with Board::makeMove() can not have such move. More...

#include <exceptions.hpp>

Inheritance diagram for tt::ex::no_such_move:
[legend]
Collaboration diagram for tt::ex::no_such_move:
[legend]

Public Member Functions

 no_such_move (const Piece *p, const Piece::Position &to, const std::string &what_arg="Selected piece can't perform such move")
 
- 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 piece moved with Board::makeMove() can not have such move.

Constructor & Destructor Documentation

◆ no_such_move()

tt::ex::no_such_move::no_such_move ( const Piece p,
const Piece::Position to,
const std::string what_arg = "Selected piece can't perform such move" 
)
inline
Parameters
pPiece object that does not have such move
totarget Position of such move
what_argmessage string

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