SpawnLocationOptions
Defined in: src/coordinates/grid.ts:47
Options for deterministic spawn coordinate selection and projection.
Properties
Section titled “Properties”candidates?
Section titled “candidates?”
optionalcandidates?: readonlyHexCoordinates[]
Defined in: src/coordinates/grid.ts:55
Explicit candidate coordinates to choose from instead of the whole shape.
count:
number
Defined in: src/coordinates/grid.ts:51
Number of spawn locations to return.
edgePadding?
Section titled “edgePadding?”
optionaledgePadding?:number
Defined in: src/coordinates/grid.ts:61
Number of outer rings/rows to avoid when selecting automatic candidates.
elevation?
Section titled “elevation?”
optionalelevation?:number
Defined in: src/coordinates/grid.ts:63
Elevation used when projecting spawn locations to world positions.
idPrefix?
Section titled “idPrefix?”
optionalidPrefix?:string
Defined in: src/coordinates/grid.ts:65
Prefix used for generated spawn ids.
minDistance?
Section titled “minDistance?”
optionalminDistance?:number
Defined in: src/coordinates/grid.ts:59
Minimum axial distance between returned spawn coordinates.
passable?
Section titled “passable?”
optionalpassable?: (coordinates) =>boolean
Defined in: src/coordinates/grid.ts:57
Predicate used to reject blocked or otherwise unsuitable coordinates.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”Returns
Section titled “Returns”boolean
optionalseed?:string|number
Defined in: src/coordinates/grid.ts:53
Seed used when candidate order must be randomized.
shape:
GameboardShape
Defined in: src/coordinates/grid.ts:49
Board shape to select candidate spawn coordinates from.