48 Type M_promotion_type;
66 Move(
Move const& move) : M_from(move.M_from), M_to(move.M_to), M_promotion_type(move.M_promotion_type) { }
73 Move& operator=(
Move const& move) { M_from = move.M_from; M_to = move.M_to; M_promotion_type = move.M_promotion_type;
return*
this; }
80 bool operator==(
Move const& move)
const 83 return M_from == move.M_from && M_to == move.M_to && M_promotion_type == move.M_promotion_type;
86 bool operator!=(
Move const& move)
const 89 return M_to != move.M_to || M_from != move.M_from || M_promotion_type != move.M_promotion_type;
A namespace for all chess related objects that are not related to the GUI.
This file contains the declaration of class Type.
This file contains the declaration of class Index.
A chess move in a particular chess position.
Move(void)
Construct an uninitialized Move.
void set_to(Index to)
Set different target square.
bool is_promotion(void) const
Return TRUE if this move is a pawn promotion.
The index of a chess square.
void set_move(Index from, Index to, Type promotion)
Set from, to and promotion type.
Move(Move const& move)
Copy-constructor.
Index from(void) const
Return the square the piece moves from.
void set_promotion(Type promotion)
Set a different promotion type.
Index to(void) const
Return the square the piece moves to.
Move(Index from, Index to, Type promotion)
Construct a Move from square from to square to.
TypeData const nothing
A constant representing the absence of a piece.
IndexData const index_end
A constant representing& #39;one past the end'.
Type promotion_type(void) const
Return the promotion type. Returns empty if this isn't a promotion.