+ def oRanDuSpiral(self, o_ran_du_center: Hex, radius: int) -> list[Hex]:
+ result: list[Hex] = [o_ran_du_center]
+ for k in range(1, radius + 1):
+ result.extend(self.oRanDuRing(o_ran_du_center, k))
+ return result
+
+ def oRanCuDirections(self) -> list[Hex]:
+ q: int = (
+ 2 * self.oRanCuSpiralRadiusOfODus
+ + 3 * self.oRanCuSpiralRadiusOfODus * self.oRanDuSpiralRadiusOfTowers
+ + self.oRanDuSpiralRadiusOfTowers
+ + 1
+ )
+ r: int = self.oRanDuSpiralRadiusOfTowers - self.oRanCuSpiralRadiusOfODus
+ s: int = -q - r
+ return [
+ Hex(+q, +r, +s),
+ Hex(-s, -q, -r),
+ Hex(+r, +s, +q),
+ Hex(-q, -r, -s),
+ Hex(+s, +q, +r),
+ Hex(-r, -s, -q),
+ ]
+
+ def oRanCuNeighbor(self, cube: Hex, direction: int) -> list[Hex]:
+ return Hexagon.hex_add(cube, self.oRanCuDirections()[direction])
+
+ def oRanCuRing(self, center: Hex, radius: int):
+ if not (radius > 0):
+ raise ValueError(
+ "Invalid radius. The radius around the hex center must be greater than 0 rings."
+ )
+
+ results: list[Hex] = []
+ hex: Hex = Hexagon.hex_add(
+ center, Hexagon.hex_scale(self.oRanCuDirections()[4], radius)
+ )
+ for i in range(6):
+ for j in range(radius):
+ results.append(hex)
+ hex = self.oRanCuNeighbor(hex, i)
+ return results
+
+ def oRanCuSpiral(self, center: Hex, radius: int) -> list[Hex]: