tartan  1.2.1.0
tt::ex::can_not_move Class Reference

Thrown when Board::makeMove() is performed on Piece that can not make any moves. More...

#include <exceptions.hpp>

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

Public Member Functions

 can_not_move (const Piece *p, const Piece::Position &to, const std::string &what_arg="Selected piece can't 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. More...
 
const Piece::Positionto () const
 Get move target location. More...
 
- 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 Board::makeMove() is performed on Piece that can not make any moves.

Constructor & Destructor Documentation

◆ can_not_move()

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

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