#include <atomic_move.h>
Public Types | |
enum | AtomicMoveType { LEFT, RIGHT, UP, DOWN } |
Public Methods | |
AtomicMove (AtomicMoveType type) | |
AtomicMoveType | type () const |
QPoint const & | diff () const |
QString | toText () const |
Private Attributes | |
AtomicMoveType | m_type |
Static Private Attributes | |
QPoint const | s_diffs [4] |
An atomic move is a move one field left, right, up or down.
|
Defines codes for atomic moves.
|
|
Constructs the atomic move from an AtomicMoveType.
|
|
Returns a point which represents the atomic move. For AtomicMove::LEFT we return QPoint(-1, 0). For AtomicMove::RIGHT we return QPoint(1, 0). For AtomicMove::UP we return QPoint(0, -1). For AtomicMove::DOWN we return QPoint(0, 1). |
|
Returns a human readable representation of the atomic move.
|
|
Returns the AtomicMoveType.
|
|
The atomic move type.
|
|
The diffs for the four directions.
|