# GridAdjacencyOptions

Defined in: [packages/graph/src/grid-adjacency.ts:12](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/grid-adjacency.ts#L12)

The board a [gridAdjacency](/reference/knotkit/graph/functions/gridadjacency/) walks, and which moves it allows.

## Properties

### rows

> `readonly` **rows**: `number`

Defined in: [packages/graph/src/grid-adjacency.ts:14](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/grid-adjacency.ts#L14)

Number of rows, a positive integer.

***

### columns

> `readonly` **columns**: `number`

Defined in: [packages/graph/src/grid-adjacency.ts:16](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/grid-adjacency.ts#L16)

Number of columns, a positive integer.

***

### connectivity?

> `readonly` `optional` **connectivity?**: `4` | `8`

Defined in: [packages/graph/src/grid-adjacency.ts:18](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/grid-adjacency.ts#L18)

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

***

### open?

> `readonly` `optional` **open?**: (`cell`) => `boolean`

Defined in: [packages/graph/src/grid-adjacency.ts:20](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/grid-adjacency.ts#L20)

Whether a cell can be entered or left at all. A closed cell has no edges, and the grid stays undirected.

#### Parameters

##### cell

`number`

#### Returns

`boolean`

***

### passable?

> `readonly` `optional` **passable?**: (`from`, `to`) => `boolean`

Defined in: [packages/graph/src/grid-adjacency.ts:25](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/graph/src/grid-adjacency.ts#L25)

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

##### from

`number`

##### to

`number`

#### Returns

`boolean`
