Logo FSBarV1_Archived

SyntheticMapGrid Module

Types

Type Description

BuildParameters

Parameters for `build`. A nominal record instead of an anonymous record so F# doesn't emit `<>f__AnonymousType…` into the XML doc member name (which trips fsdocs' XML parser at docs-generation time).

Functions and values

Function or value Description

build parameters

Full Usage: build parameters

Parameters:
Returns: MapGrid

Build a MapGrid suitable for rendering tests.

parameters : BuildParameters
Returns: MapGrid

flat width height

Full Usage: flat width height

Parameters:
    width : int
    height : int

Returns: MapGrid

Build a flat MapGrid with all cells Land (slope 0, height 10), zero metal/LOS/radar. `width` and `height` are heightmap grid squares. HeightMap is (width+1) × (height+1), SlopeMap/ResourceMap/LosMap/RadarMap are at heightmap resolution.

width : int
height : int
Returns: MapGrid

oneGapCorridor width height gapCells

Full Usage: oneGapCorridor width height gapCells

Parameters:
    width : int
    height : int
    gapCells : int

Returns: MapGrid

A width×height flat grid with a single N-S impassable wall near the middle of the heightmap and a `gapCells`-tall open gap centred at heightmap-corner z = height/2. Pass `gapCells = 0` for a fully sealed wall.

width : int
height : int
gapCells : int
Returns: MapGrid

withCliff grid centreX centreZ radius

Full Usage: withCliff grid centreX centreZ radius

Parameters:
    grid : MapGrid
    centreX : int
    centreZ : int
    radius : int

Returns: MapGrid

Stamp a circular high-slope zone of radius `radius` cells at (centreX, centreZ).

grid : MapGrid
centreX : int
centreZ : int
radius : int
Returns: MapGrid

withMetalSpot grid x z value

Full Usage: withMetalSpot grid x z value

Parameters:
    grid : MapGrid
    x : int
    z : int
    value : int

Returns: MapGrid

Stamp a metal spot value at heightmap cell (x, z).

grid : MapGrid
x : int
z : int
value : int
Returns: MapGrid

withWall grid x1 z1 x2 z2

Full Usage: withWall grid x1 z1 x2 z2

Parameters:
    grid : MapGrid
    x1 : int
    z1 : int
    x2 : int
    z2 : int

Returns: MapGrid

Stamp a line of impassable cells along a Bresenham line between (x1,z1) and (x2,z2). Impassability is encoded as slope 1.0 (rejected by every MoveType).

grid : MapGrid
x1 : int
z1 : int
x2 : int
z2 : int
Returns: MapGrid

Type something to start searching.