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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GameboardBuilder(
options):GameboardBuilder
Defined in: src/gameboard/gameboard.ts:796
Create a builder and initialize all tiles in the requested shape.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”GameboardBuilder
Properties
Section titled “Properties”
readonlyseed:string
Defined in: src/gameboard/gameboard.ts:782
Seed used by deterministic builder helpers.
readonlyshape:GameboardShape
Defined in: src/gameboard/gameboard.ts:784
Shape populated by this builder.
textureSet
Section titled “textureSet”
readonlytextureSet:"default"|"fall"|"summer"|"winter"
Defined in: src/gameboard/gameboard.ts:786
Texture set applied to generated terrain.
Methods
Section titled “Methods”addBridge()
Section titled “addBridge()”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.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addConstructionSite()
Section titled “addConstructionSite()”addConstructionSite(
options):this
Defined in: src/gameboard/gameboard.ts:1087
Add a construction, ruin, or worksite structure with construction metadata.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addElevationRamp()
Section titled “addElevationRamp()”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.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addFactionBuilding()
Section titled “addFactionBuilding()”addFactionBuilding(
options):this
Defined in: src/gameboard/gameboard.ts:1007
Add a faction building structure placement.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addFlag()
Section titled “addFlag()”addFlag(
at,faction,options?):this
Defined in: src/gameboard/gameboard.ts:1194
Add a faction flag prop placement.
Parameters
Section titled “Parameters”faction
Section titled “faction”"blue" | "green" | "red" | "yellow"
options?
Section titled “options?”rotationSteps?
Section titled “rotationSteps?”number
scale?
Section titled “scale?”number
Returns
Section titled “Returns”this
addForest()
Section titled “addForest()”addForest(
coordinates,options?):this
Defined in: src/gameboard/gameboard.ts:976
Add a forest decoration and mark the tile as forest terrain.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”options?
Section titled “options?”boolean
"small" | "medium" | "large"
species?
Section titled “species?”"A" | "B"
Returns
Section titled “Returns”this
addFortification()
Section titled “addFortification()”addFortification(
options):this
Defined in: src/gameboard/gameboard.ts:1062
Add a wall or fence segment with fortification metadata.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addHarbor()
Section titled “addHarbor()”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.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addHill()
Section titled “addHill()”addHill(
coordinates,options?):this
Defined in: src/gameboard/gameboard.ts:951
Add a hill decoration and mark the tile as hill terrain.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”options?
Section titled “options?”rotationSteps?
Section titled “rotationSteps?”number
single?
Section titled “single?”boolean
variant?
Section titled “variant?”withTrees?
Section titled “withTrees?”boolean
Returns
Section titled “Returns”this
addMountainStack()
Section titled “addMountainStack()”addMountainStack(
options):this
Defined in: src/gameboard/gameboard.ts:923
Add an elevated mountain tile plus a visible mountain-stack placement.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addNature()
Section titled “addNature()”addNature(
options):this
Defined in: src/gameboard/gameboard.ts:1162
Add a nature decoration placement.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addNeutralStructure()
Section titled “addNeutralStructure()”addNeutralStructure(
options):this
Defined in: src/gameboard/gameboard.ts:1024
Add a neutral structure placement.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addPlacement()
Section titled “addPlacement()”addPlacement(
options):this
Defined in: src/gameboard/gameboard.ts:1421
Add a custom placement to the plan.
Parameters
Section titled “Parameters”options
Section titled “options”assetId
Section titled “assetId”string
elevationOffset?
Section titled “elevationOffset?”number
metadata?
Section titled “metadata?”Readonly<Record<string, string | number | boolean | null>>
requiresExtra?
Section titled “requiresExtra?”boolean
rotationSteps?
Section titled “rotationSteps?”number
scale?
Section titled “scale?”number
stackIndex?
Section titled “stackIndex?”number
Returns
Section titled “Returns”this
addProp()
Section titled “addProp()”addProp(
options):this
Defined in: src/gameboard/gameboard.ts:1178
Add a prop placement.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addPropCluster()
Section titled “addPropCluster()”addPropCluster(
options):this
Defined in: src/gameboard/gameboard.ts:1206
Add a semantic prop cluster such as a camp, worksite, stable yard, or cache.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addRiverPath()
Section titled “addRiverPath()”addRiverPath(
path,options?):this
Defined in: src/gameboard/gameboard.ts:903
Add river connectivity along a coordinate path.
Parameters
Section titled “Parameters”readonly HexCoordinates[]
options?
Section titled “options?”crossing?
Section titled “crossing?”"A" | "B"
curvy?
Section titled “curvy?”boolean
waterless?
Section titled “waterless?”boolean
Returns
Section titled “Returns”this
addRoadPath()
Section titled “addRoadPath()”addRoadPath(
path,options?):this
Defined in: src/gameboard/gameboard.ts:885
Add road connectivity along a coordinate path.
Parameters
Section titled “Parameters”readonly HexCoordinates[]
options?
Section titled “options?”slope?
Section titled “slope?”"high" | "low"
Returns
Section titled “Returns”this
addSettlement()
Section titled “addSettlement()”addSettlement(
options):this
Defined in: src/gameboard/gameboard.ts:1000
Add a settlement building. Alias for addFactionBuilding.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addSiegeProjectile()
Section titled “addSiegeProjectile()”addSiegeProjectile(
options):this
Defined in: src/gameboard/gameboard.ts:1108
Add a neutral siege projectile with projectile-specific metadata.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addTransition()
Section titled “addTransition()”addTransition(
options):this
Defined in: src/gameboard/gameboard.ts:1252
Add an EXTRA texture transition placement.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addUnit()
Section titled “addUnit()”addUnit(
options):this
Defined in: src/gameboard/gameboard.ts:1269
Add one unit part placement from the EXTRA unit library.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
addUnitPreset()
Section titled “addUnitPreset()”addUnitPreset(
options):this
Defined in: src/gameboard/gameboard.ts:1297
Add a predefined multi-part unit composition.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
build()
Section titled “build()”build():
GameboardPlan
Defined in: src/gameboard/gameboard.ts:1462
Build an immutable gameboard plan from current builder state.
Returns
Section titled “Returns”scatterDecorations()
Section titled “scatterDecorations()”scatterDecorations(
options):this
Defined in: src/gameboard/gameboard.ts:1383
Scatter random decoration placements across matching terrain.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this
setCoastEdges()
Section titled “setCoastEdges()”setCoastEdges(
coordinates,waterEdges,options?):this
Defined in: src/gameboard/gameboard.ts:869
Mark a tile as coast and set the edges that face water.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”waterEdges
Section titled “waterEdges”number | readonly HexEdgeIndex[]
options?
Section titled “options?”waterless?
Section titled “waterless?”boolean
Returns
Section titled “Returns”this
setElevation()
Section titled “setElevation()”setElevation(
coordinates,elevation):this
Defined in: src/gameboard/gameboard.ts:859
Set the elevation for an existing tile.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”elevation
Section titled “elevation”number
Returns
Section titled “Returns”this
setTerrain()
Section titled “setTerrain()”setTerrain(
coordinates,terrain,options?):this
Defined in: src/gameboard/gameboard.ts:811
Set a base grass or water terrain tile.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”terrain
Section titled “terrain”"grass" | "water"
options?
Section titled “options?”baseAssetId?
Section titled “baseAssetId?”string
elevation?
Section titled “elevation?”number
textureSet?
Section titled “textureSet?”"default" | "fall" | "summer" | "winter"
Returns
Section titled “Returns”this
setTextureSet()
Section titled “setTextureSet()”setTextureSet(
coordinates,textureSet):this
Defined in: src/gameboard/gameboard.ts:850
Set the texture set for an existing tile without changing its terrain.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”textureSet
Section titled “textureSet”"default" | "fall" | "summer" | "winter"
Returns
Section titled “Returns”this
setTileAsset()
Section titled “setTileAsset()”setTileAsset(
options):this
Defined in: src/gameboard/gameboard.ts:828
Override a tile’s base asset, terrain, elevation, connectivity, and tags.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”this