Reference · Rules, generation and deductions
isSolvablefunction
Verify a board from one opening, using only clues that have been uncovered.
Import it
import { isSolvable } from "@johnmorrisdotca/jirai";
Definition
function isSolvable(board: Board, enumerate?: boolean): boolean
Parameters
| Name | Type | Description |
|---|---|---|
board | Board | The dealt native field; it includes private answer data. |
enumerate (optional) | boolean | Whether to include bounded exact frontier enumeration in the deduction/proof check. |
Returns
boolean
Verify a board from one opening, using only clues that have been uncovered.
Examples
import type { Settings } from "@johnmorrisdotca/jirai";
import { isSolvable, makeBoard } from "@johnmorrisdotca/jirai";
const settings: Settings={width:3,height:3,mines:1,grid:"square",noGuess:false,opening:"clear",seed:42};
const board=makeBoard(settings,0,{attempts:1,repair:false});
console.log(isSolvable(board));trueWhat it prints (run when this page was built)