Skip to content

Defined in: packages/graph/src/grid-adjacency.ts:12

The board a gridAdjacency walks, and which moves it allows.

readonly rows: number

Defined in: packages/graph/src/grid-adjacency.ts:14

Number of rows, a positive integer.


readonly columns: number

Defined in: packages/graph/src/grid-adjacency.ts:16

Number of columns, a positive integer.


readonly optional connectivity?: 4 | 8

Defined in: packages/graph/src/grid-adjacency.ts:18

4 for orthogonal moves (the default), 8 to add the diagonals.


readonly optional open?: (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.

number

boolean


readonly optional passable?: (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.

number

number

boolean