Reference · Pipes, rules and solving
isGameSolvedfunction
Whether the game is solved: the same test the check makes of an answer.
Import it
import { isGameSolved } from "@johnmorrisdotca/suido";
Definition
function isGameSolved(game: Game): boolean
Parameters
| Name | Type | Description |
|---|---|---|
game | Game | The current immutable game state. |
Returns
boolean
Whether the game is solved: the same test the check makes of an answer.
Examples
import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { isGameSolved, newGame } from "@johnmorrisdotca/suido";
const row = SUIDO_5X5[0];
const code = row[0];
const game = newGame(code)!;
console.log(isGameSolved(game));falseWhat it prints (run when this page was built)