Skip to content

useGameboardActions

useGameboardActions(): object

Defined in: src/react/react.ts:408

Bind low-level board actions for loading, clearing, and spawning tile plans.

canOccupyPlacement: (options) => boolean

Return only the boolean occupancy result for a proposed placement.

InspectGameboardPlacementOccupancyOptions

boolean

clear: () => void

Remove all board tile, placement, and board-state traits from the world.

void

inspectPlacementOccupancy: (options) => GameboardPlacementOccupancyInspection

Inspect whether a proposed placement footprint can occupy its target tiles.

InspectGameboardPlacementOccupancyOptions

GameboardPlacementOccupancyInspection

loadPlan: (plan) => GameboardEntityIndex

Replace the current world contents with a complete generated board plan.

GameboardPlan

GameboardEntityIndex

movePlacement: (placement, to, options) => Entity

Move an existing placement to another tile while preserving unspecified state.

string | Entity

string | HexCoordinates

UpdateGameboardPlacementOptions = {}

Entity

removePlacement: (placement) => boolean

Remove an existing placement by entity or placement id.

string | Entity

boolean

spawnPlacement: (options) => Entity

Spawn a runtime placement into the board.

SpawnGameboardPlacementOptions

Entity

updatePlacement: (placement, options) => Entity

Update an existing runtime placement by entity or placement id.

string | Entity

UpdateGameboardPlacementOptions

Entity