pyhexlib.hexagons module
- class pyhexlib.hexagons.HexagonalGrid(hexagons)[source]
Bases:
object- Parameters:
hexagons (List[Hexagon])
- property axial_coordinates
- static get_direction(start, end)[source]
Returns the direction from start to end as one of the constants NORTH, NORTHEAST, etc. If end is not a direct neighbor of start, returns None.
- get_direction_(rc1, rc2)[source]
Returns the direction from rc1 to rc2 as one of the constants NORTH, NORTHEAST, etc. If rc2 is not a direct neighbor of rc1, return the approximate direction (closest of the six). If rc1 == rc2, returns None.
- get_neighborhood(rc, max_cost, cost_fn=None, dist=1)[source]
- Parameters:
rc (Hexagon)
max_cost (int)
dist (int)
- Return type:
- property size: tuple[int, int]