Reference · Rules, generation and deductions
activeCellfunction
Row-major addresses stay stable; omitted cells have no clue and no neighbours.
Import it
import { activeCell } from "@johnmorrisdotca/jirai";
Definition
function activeCell(settings: Settings, cell: number): boolean
Parameters
| Name | Type | Description |
|---|---|---|
settings | Settings | The validated native field dimensions, mine count, topology, shape, opening, generation policy and numeric seed. |
cell | number | An active native cell index in row-major board order. |
Returns
boolean
Row-major addresses stay stable; omitted cells have no clue and no neighbours.
Examples
import type { Settings } from "@johnmorrisdotca/jirai";
import { activeCell } from "@johnmorrisdotca/jirai";
const settings: Settings={width:3,height:3,mines:1,grid:"square",noGuess:false,opening:"clear",seed:42};
console.log(activeCell(settings,0));trueWhat it prints (run when this page was built)