tartan  1.2.1.0
tt::ex::piece_in_wrong_color Class Reference

Thrown when trying to Board::makeMove() on Piece that has wrong Piece::Color. More...

#include <exceptions.hpp>

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

Public Member Functions

 piece_in_wrong_color (const Piece *p, const Piece::Position &to, const std::string &what_arg="Moved piece is in wrong color")
 
- 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 trying to Board::makeMove() on Piece that has wrong Piece::Color.

Constructor & Destructor Documentation

◆ piece_in_wrong_color()

tt::ex::piece_in_wrong_color::piece_in_wrong_color ( const Piece p,
const Piece::Position to,
const std::string what_arg = "Moved piece is in wrong color" 
)
inline
Parameters
pPiece object that is in wrong color
totarget Position of move
what_argmessage string

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