Skip to content

RowGrid2

Defined in: row-grid2.ts:8

Row grid: fixed row count, unbounded column count. Row-major storage: cells[row][col].

T

new RowGrid2<T>(rows): RowGrid2<T>

Defined in: row-grid2.ts:12

number

RowGrid2<T>

Grid2.constructor

readonly cells: (T | undefined)[][]

Defined in: row-grid2.ts:10


readonly rows: number

Defined in: row-grid2.ts:9

canPlaceRect(rect): boolean

Defined in: grid2.ts:14

GridRect2

boolean

Grid2.canPlaceRect


clone(): RowGrid2<T>

Defined in: row-grid2.ts:18

RowGrid2<T>


contains(coord): boolean

Defined in: row-grid2.ts:30

Returns true if the coordinate is within the fixed row bounds. Cols are unbounded.

GridCoord2

boolean

Grid2.contains


getCell(coord): T | undefined

Defined in: row-grid2.ts:34

GridCoord2

T | undefined

Grid2.getCell


getCells(): IterableIterator<[GridCoord2, T]>

Defined in: row-grid2.ts:41

IterableIterator<[GridCoord2, T]>


getFirstEmpty(): GridCoord2

Defined in: row-grid2.ts:57

Returns the first empty cell in column-major order (cols grow rightward).

GridCoord2


getRectNeighbors(rect): Set<T>

Defined in: grid2.ts:50

GridRect2

Set<T>

Grid2.getRectNeighbors


placeRect(rect, value): void

Defined in: grid2.ts:39

GridRect2

T

void

Grid2.placeRect


setCell(coord, value): void

Defined in: row-grid2.ts:67

GridCoord2

T

void

Grid2.setCell