+class MapGeometryHex(MapGeometryWithLeftRightMoves):
+
+ def move_UPLEFT(self, start_pos):
+ start_indented = start_pos.y % 2
+ if start_indented:
+ return YX(start_pos.y - 1, start_pos.x)
+ else:
+ return YX(start_pos.y - 1, start_pos.x - 1)
+
+ def move_UPRIGHT(self, start_pos):
+ start_indented = start_pos.y % 2
+ if start_indented:
+ return YX(start_pos.y - 1, start_pos.x + 1)
+ else:
+ return YX(start_pos.y - 1, start_pos.x)
+
+ def move_DOWNLEFT(self, start_pos):
+ start_indented = start_pos.y % 2
+ if start_indented:
+ return YX(start_pos.y + 1, start_pos.x)
+ else:
+ return YX(start_pos.y + 1, start_pos.x - 1)
+
+ def move_DOWNRIGHT(self, start_pos):
+ start_indented = start_pos.y % 2
+ if start_indented:
+ return YX(start_pos.y + 1, start_pos.x + 1)
+ else:
+ return YX(start_pos.y + 1, start_pos.x)
+
+
+
class Map():
def __init__(self, map_size):