Defined in: packages/graph/src/grid-adjacency.ts:12
The board a gridAdjacency walks, and which moves it allows.
Properties
Section titled “Properties”
readonlyrows:number
Defined in: packages/graph/src/grid-adjacency.ts:14
Number of rows, a positive integer.
columns
Section titled “columns”
readonlycolumns:number
Defined in: packages/graph/src/grid-adjacency.ts:16
Number of columns, a positive integer.
connectivity?
Section titled “connectivity?”
readonlyoptionalconnectivity?:4|8
Defined in: packages/graph/src/grid-adjacency.ts:18
4 for orthogonal moves (the default), 8 to add the diagonals.
readonlyoptionalopen?: (cell) =>boolean
Defined in: packages/graph/src/grid-adjacency.ts:20
Whether a cell can be entered or left at all. A closed cell has no edges, and the grid stays undirected.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”boolean
passable?
Section titled “passable?”
readonlyoptionalpassable?: (from,to) =>boolean
Defined in: packages/graph/src/grid-adjacency.ts:25
Whether the single move from from to to is allowed. Setting it makes
the grid directed, because a move allowed one way may be refused the other.
Parameters
Section titled “Parameters”number
number
Returns
Section titled “Returns”boolean