five-on-it / packages/catalogue/src/town-fields / checkTownGrid
Function: checkTownGrid()
checkTownGrid(
spec,add):object
Defined in: packages/catalogue/src/town-fields.ts:235
The problems a grid of blocks has once each field is well formed on its own: avenues on lines of the grid, each once; districts named once, their blocks within the grid and painted once; parks within the grid, each once. add takes a path under the grid's object; returns whether a block lies within the grid and how to say it.
Parameters
spec
TownGrid
add
(path, message) => void
Returns
object
grid
grid:
string
inGrid
inGrid: (
c) =>boolean
Parameters
c
readonly [number, number]
Returns
boolean