Reference · Four-neighbour rules
newOrthogonalGamefunction
Starts a game under four-neighbour rules.
Import it
import { newOrthogonalGame } from "@johnmorrisdotca/jirai/orthogonal";
Also exported from: @johnmorrisdotca/jirai
Definition
function newOrthogonalGame(settings: OrthogonalSettings): Game
Parameters
| Name | Type | Description |
|---|---|---|
settings | OrthogonalSettings | The validated native field dimensions, mine count, topology, shape, opening, generation policy and numeric seed. |
Returns
Game
Starts a game under four-neighbour rules.
Examples
import type { OrthogonalSettings } from "@johnmorrisdotca/jirai/orthogonal";
import { newOrthogonalGame } from "@johnmorrisdotca/jirai/orthogonal";
const orthogonalSettings: OrthogonalSettings={width:3,height:3,mines:1,noGuess:false,opening:"clear",seed:42};
console.log(newOrthogonalGame(orthogonalSettings).status);readyWhat it prints (run when this page was built)