A chess move in a particular chess position. More...
|Construct an uninitialized Move. |
|Move (Index from, Index to, Type promotion)|
|Construct a Move from square from to square to. |
|Move (Move const& move)|
|Move&||operator= (Move const& move)|
|bool||operator== (Move const& move) const|
|bool||operator!= (Move const& move) const|
|bool||is_promotion (void) const|
|Return TRUE if this move is a pawn promotion. |
|Index||from (void) const|
|Return the square the piece moves from. |
|Index||to (void) const|
|Return the square the piece moves to. |
|Type||promotion_type (void) const|
|Return the promotion type. Returns empty if this isn't a promotion. |
|void||set_promotion (Type promotion)|
|Set a different promotion type. |
|void||set_to (Index to)|
|Set different target square. |
|void||set_move (Index from, Index to, Type promotion)|
|Set from, to and promotion type. |
A chess move in a particular chess position.
This class represents a move as can be done in a particular chess position. That means that it cannot be used to do the same move in another position where that move is possible too. The reason for that is that it's internal representation only stores the squares, and not piece information.