示例#1
0
 def coordinates(self):
     h = HexagonalGrid3DCoordSet(self.coordinates_trapezoid(5, 4))
     coords = set(
         list(h.translate((5, 3, 0))) +
         list(h.rotate0(2).translate((4, 5, 0))) +
         list(h.rotate0(4).translate((3, 4, 0))))
     return sorted(coords)
示例#2
0
 def coordinates(self):
     h = HexagonalGrid3DCoordSet(self.coordinates_elongated_hexagon(5, 2))
     coords = set(
         list(h.translate((5, 4, 0))) +
         list(h.rotate0(1).translate((6, -1, 0))) +
         list(h.rotate0(2).translate((6, 5, 0))))
     return sorted(coords)
示例#3
0
 def coordinates(self):
     h = HexagonalGrid3DCoordSet(
         list(self.coordinates_bordered(4, 3, offset=(0, 1, 0))) +
         list(self.coordinates_hexagon(2)))
     coords = set(
         list(h.translate((0, 2, 0))) +
         list(h.rotate0(2).translate((10, 0, 0))) +
         list(h.rotate0(4).translate((2, 10, 0))))
     return sorted(coords)
示例#4
0
 def coordinates(self):
     s = HexagonalGrid3DCoordSet(
         list(self.coordinates_triangle(2)) + [
             self.coordinate_offset(x, y, z, None)
             for (x, y, z) in self.extras
         ])
     coords = set()
     self.shapes = []
     for i in range(4):
         t = s.translate((i * 4, (3 - i) * 2, 0))
         coords.update(t)
         self.shapes.append(t)
     return sorted(coords)
示例#5
0
 def coordinates(self):
     s = HexagonalGrid3DCoordSet(
         list(self.coordinates_triangle(2)) + [
             self.coordinate_offset(x, y, z, None)
             for (x, y, z) in self.extras
         ])
     coords = set()
     self.shapes = []
     for i, offset in enumerate(self.offsets):
         if not offset:
             continue
         shape = s.rotate0(i).translate(offset)
         coords.update(shape)
         self.shapes.append(shape)
     return sorted(coords)