useGameboardActions
useGameboardActions():
object
Defined in: src/react/react.ts:408
Bind low-level board actions for loading, clearing, and spawning tile plans.
Returns
Section titled “Returns”canOccupyPlacement
Section titled “canOccupyPlacement”canOccupyPlacement: (
options) =>boolean
Return only the boolean occupancy result for a proposed placement.
Parameters
Section titled “Parameters”options
Section titled “options”InspectGameboardPlacementOccupancyOptions
Returns
Section titled “Returns”boolean
clear: () =>
void
Remove all board tile, placement, and board-state traits from the world.
Returns
Section titled “Returns”void
inspectPlacementOccupancy
Section titled “inspectPlacementOccupancy”inspectPlacementOccupancy: (
options) =>GameboardPlacementOccupancyInspection
Inspect whether a proposed placement footprint can occupy its target tiles.
Parameters
Section titled “Parameters”options
Section titled “options”InspectGameboardPlacementOccupancyOptions
Returns
Section titled “Returns”GameboardPlacementOccupancyInspection
loadPlan
Section titled “loadPlan”loadPlan: (
plan) =>GameboardEntityIndex
Replace the current world contents with a complete generated board plan.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”movePlacement
Section titled “movePlacement”movePlacement: (
placement,to,options) =>Entity
Move an existing placement to another tile while preserving unspecified state.
Parameters
Section titled “Parameters”placement
Section titled “placement”string | Entity
string | HexCoordinates
options?
Section titled “options?”UpdateGameboardPlacementOptions = {}
Returns
Section titled “Returns”Entity
removePlacement
Section titled “removePlacement”removePlacement: (
placement) =>boolean
Remove an existing placement by entity or placement id.
Parameters
Section titled “Parameters”placement
Section titled “placement”string | Entity
Returns
Section titled “Returns”boolean
spawnPlacement
Section titled “spawnPlacement”spawnPlacement: (
options) =>Entity
Spawn a runtime placement into the board.
Parameters
Section titled “Parameters”options
Section titled “options”SpawnGameboardPlacementOptions
Returns
Section titled “Returns”Entity
updatePlacement
Section titled “updatePlacement”updatePlacement: (
placement,options) =>Entity
Update an existing runtime placement by entity or placement id.
Parameters
Section titled “Parameters”placement
Section titled “placement”string | Entity
options
Section titled “options”UpdateGameboardPlacementOptions
Returns
Section titled “Returns”Entity