Skip to content

GameboardNavigation

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:109

Reusable navigation facade for one plan/profile pair.

canEnter: (coordinates, from?) => boolean

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:125

Return whether a tile can be entered from an optional source tile.

string | HexCoordinates

string | HexCoordinates

boolean


findPath: (start, goal) => GameboardNavigationPathResult

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:131

Find a path between two tiles.

string | HexCoordinates

string | HexCoordinates

GameboardNavigationPathResult


isBlocked: (coordinates) => boolean

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:123

Return whether a tile key or coordinates are blocked.

string | HexCoordinates

boolean


movementCost: (from, to) => number

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:127

Calculate movement cost between adjacent tiles.

string | HexCoordinates

string | HexCoordinates

number


neighbors: (coordinates) => GameboardTileSpec[]

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:129

Return neighboring tiles inside the board.

string | HexCoordinates

GameboardTileSpec[]


occupancy: GameboardOccupancyIndex

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:117

Occupancy lookup for the plan/profile pair.


placementsAt: (coordinates) => readonly GameboardPlacementSpec[]

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:121

Read placements occupying a tile.

string | HexCoordinates

readonly GameboardPlacementSpec[]


plan: GameboardPlan

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:111

Board plan being navigated.


profile: RequiredGameboardNavigationProfile

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:113

Normalized required navigation profile.


reachable: (start, movementBudget) => GameboardReachableTile[]

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:136

Return tiles reachable from a start tile within a movement budget.

string | HexCoordinates

number

GameboardReachableTile[]


tileAt: (coordinates) => GameboardTileSpec | undefined

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:119

Resolve a tile from coordinates or tile key.

string | HexCoordinates

GameboardTileSpec | undefined


tilesByKey: ReadonlyMap<string, GameboardTileSpec>

Defined in: packages/declarative-hex-worlds/src/gameboard/navigation.ts:115

Tile lookup by tile key.