HexCell

phasic.HexCell(row, col, _grid)

Lightweight view of a hex grid cell with neighbor access.

Parameters

row : int

Row index in the grid.

col : int

Column index in the grid.

Attributes

coords : tuple[float, float]

Real-world (x, y) coordinates of the cell center.

is_valid : bool

Whether the cell is inside the boundary.

Methods

Name Description
neighbors First-order valid neighbors as HexCell objects.
neighbors_within All valid neighbors within distance hex steps.

neighbors

phasic.HexCell.neighbors()

First-order valid neighbors as HexCell objects.

neighbors_within

phasic.HexCell.neighbors_within(distance)

All valid neighbors within distance hex steps.