Skip to content

GameboardBuilder

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

Fluent builder for deterministic gameboard plans using KayKit guide variants, stacked terrain, roads, rivers, harbors, settlements, props, and EXTRA units.

new GameboardBuilder(options): GameboardBuilder

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

Create a builder and initialize all tiles in the requested shape.

GameboardPlanOptions

GameboardBuilder

readonly seed: string

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

Seed used by deterministic builder helpers.


readonly shape: GameboardShape

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

Shape populated by this builder.


readonly textureSet: "default" | "fall" | "summer" | "winter"

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

Texture set applied to generated terrain.

addBridge(options): this

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

Add a bridge structure with bridge-specific metadata instead of requiring callers to know the raw neutral-structure asset ids.

BridgeOptions

this


addConstructionSite(options): this

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

Add a construction, ruin, or worksite structure with construction metadata.

ConstructionSiteOptions

this


addElevationRamp(options): this

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

Add a sloped grass ramp with ramp-specific metadata instead of requiring callers to place hex_grass_sloped_high or hex_grass_sloped_low directly.

ElevationRampOptions

this


addFactionBuilding(options): this

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

Add a faction building structure placement.

FactionBuildingOptions

this


addFlag(at, faction, options?): this

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

Add a faction flag prop placement.

HexCoordinates

"blue" | "green" | "red" | "yellow"

number

number

this


addForest(coordinates, options?): this

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

Add a forest decoration and mark the tile as forest terrain.

HexCoordinates

boolean

"small" | "medium" | "large"

"A" | "B"

this


addFortification(options): this

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

Add a wall or fence segment with fortification metadata.

FortificationOptions

this


addHarbor(options): this

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

Add a harbor structure, mark the coast/water relationship, and optionally place adjacent water props.

HarborOptions

this


addHill(coordinates, options?): this

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

Add a hill decoration and mark the tile as hill terrain.

HexCoordinates

number

boolean

HillVariant

boolean

this


addMountainStack(options): this

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

Add an elevated mountain tile plus a visible mountain-stack placement.

MountainStackOptions

this


addNature(options): this

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

Add a nature decoration placement.

NaturePlacementOptions

this


addNeutralStructure(options): this

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

Add a neutral structure placement.

NeutralStructureOptions

this


addPlacement(options): this

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

Add a custom placement to the plan.

string

HexCoordinates

number

GameboardPlacementKind

GameboardPlacementLayer

Readonly<Record<string, string | number | boolean | null>>

boolean

number

number

number

this


addProp(options): this

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

Add a prop placement.

PropPlacementOptions

this


addPropCluster(options): this

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

Add a semantic prop cluster such as a camp, worksite, stable yard, or cache.

PropClusterOptions

this


addRiverPath(path, options?): this

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

Add river connectivity along a coordinate path.

readonly HexCoordinates[]

"A" | "B"

boolean

boolean

this


addRoadPath(path, options?): this

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

Add road connectivity along a coordinate path.

readonly HexCoordinates[]

"high" | "low"

this


addSettlement(options): this

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

Add a settlement building. Alias for addFactionBuilding.

SettlementOptions

this


addSiegeProjectile(options): this

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

Add a neutral siege projectile with projectile-specific metadata.

SiegeProjectileOptions

this


addTransition(options): this

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

Add an EXTRA texture transition placement.

TransitionPlacementOptions

this


addUnit(options): this

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

Add one unit part placement from the EXTRA unit library.

UnitPlacementOptions

this


addUnitPreset(options): this

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

Add a predefined multi-part unit composition.

UnitPresetOptions

this


build(): GameboardPlan

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

Build an immutable gameboard plan from current builder state.

GameboardPlan


scatterDecorations(options): this

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

Scatter random decoration placements across matching terrain.

ScatterDecorationOptions

this


setCoastEdges(coordinates, waterEdges, options?): this

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

Mark a tile as coast and set the edges that face water.

HexCoordinates

number | readonly HexEdgeIndex[]

boolean

this


setElevation(coordinates, elevation): this

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

Set the elevation for an existing tile.

HexCoordinates

number

this


setTerrain(coordinates, terrain, options?): this

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

Set a base grass or water terrain tile.

HexCoordinates

"grass" | "water"

string

number

"default" | "fall" | "summer" | "winter"

this


setTextureSet(coordinates, textureSet): this

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

Set the texture set for an existing tile without changing its terrain.

HexCoordinates

"default" | "fall" | "summer" | "winter"

this


setTileAsset(options): this

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

Override a tile’s base asset, terrain, elevation, connectivity, and tags.

TileAssetOptions

this