168 if (this->
posY > 0) {
175 if (this->posX < WORLD_W - 1 && this->
posY > 0) {
188 if (this->posX < WORLD_W -1 && this->
posY <
WORLD_H - 1) {
211 if (this->
posX > 0) {
218 if (this->
posX > 0 && this->
posY > 0) {
int posY
Vertical coordnate of the position.
int posX
Horizontal coordinate of the position.
bool move(Direction2 dir)
Position & operator=(const Position &pos)
Header file for Micropolis game engine.
@ DIR2_SOUTH_EAST
Direction pointing south-east.
@ DIR2_NORTH_EAST
Direction pointing north-east.
@ 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.