int posY
Vertical coordnate of the position.
int posX
Horizontal coordinate of the position.
bool move(Direction2 dir)
Position & operator=(const Position &pos)
static Direction2 rotate45(Direction2 dir, int count=1)
static Direction2 rotate180(Direction2 dir)
@ DIR2_SOUTH_EAST
Direction pointing south-east.
@ DIR2_NORTH_EAST
Direction pointing north-east.
@ DIR2_BEGIN
First valid direction.
@ DIR2_END
End-condition for directions.
@ DIR2_WEST
Direction pointing west.
@ DIR2_INVALID
Invalid direction.
@ DIR2_SOUTH
Direction pointing south.
@ DIR2_EAST
Direction pointing east.
@ DIR2_NORTH_WEST
Direction pointing north-west.
@ DIR2_SOUTH_WEST
Direction pointing south-west.
@ DIR2_NORTH
Direction pointing north.
static Direction2 increment45(Direction2 dir, int count=1)
bool operator<(const Position &pos1, const Position &pos2)
static Direction2 rotate90(Direction2 dir)
static Direction2 increment90(Direction2 dir)