|
Cute Chess
0.1
|
A small and efficient chessmove class. More...
#include <move.h>
Public Member Functions | |
| bool | isNull () const |
| Move () | |
| Move (int sourceSquare, int targetSquare, int promotion=0) | |
| bool | operator!= (const Move &other) const |
| bool | operator== (const Move &other) const |
| int | promotion () const |
| int | sourceSquare () const |
| int | targetSquare () const |
A small and efficient chessmove class.
This class is designed to be used internally by Board objects, and to store minimal information about the move. A Board object is needed to verify the move's legality or to convert it to a string.
The source and target squares have an integer format specific to a certain type of chess variant. The Board class has methods for converting between these integers and the generic Square type.
|
inline |
Creates an empty Move (null move).
|
inline |
Creates a new Move object with at least a source square and a target square.
|
inline |
Returns true if this is a null move.
|
inline |
Returns true if other is different from this move.
|
inline |
Returns true if other is equal to this move.
|
inline |
Type of the promotion piece.
A value of 0 means no promotion. If this move is a piece drop, the promotion type denotes the type of the dropped piece.
|
inline |
The source square.
A value of 0 means that this move is a piece drop, a special move allowed by some variants.
|
inline |
The target square.
1.8.11