void MoveLeft() { GridLocation left = GridController.Left(location); if (left != null && GridController.CanWalkOn(left)) { nextlocation = left; } }
void MoveDown() { GridLocation down = GridController.Below(location); if (down != null && GridController.CanWalkOn(down)) { nextlocation = down; } }
void MoveRight() { GridLocation right = GridController.Right(location); if (right != null && GridController.CanWalkOn(right)) { nextlocation = right; } }
void MoveUp() { GridLocation above = GridController.Above(location); if (above != null && GridController.CanWalkOn(above)) { nextlocation = above; } }