Skip to content

GameboardPlanIndex

Defined in: src/gameboard/gameboard.ts:256

Memoized indexes derived from a GameboardPlan (PRD B4).

Previously, hot-path callers in coordinates/layout.ts + interop/interop.ts rebuilt these maps on every invocation — 4+ calls per render frame. The indexes are now built once via gameboardPlanIndex and cached per-plan in a module-local WeakMap, so the second-and-later callers pay O(1) lookup instead of O(N) rebuild.

readonly placementsByTile: ReadonlyMap<string, readonly GameboardPlacementSpec[]>

Defined in: src/gameboard/gameboard.ts:260

Placement specs grouped by their tile’s q,r hexKey.


readonly tilesByKey: ReadonlyMap<string, GameboardTileSpec>

Defined in: src/gameboard/gameboard.ts:258

Tile keyed by q,r hexKey.