masyuFinishedfunction
Whether this Masyu game satisfies its complete native rules.
Import it
import { masyuFinished } from "@johnmorrisdotca/kazu/masyu";
Also exported from: @johnmorrisdotca/kazu
Definition
function masyuFinished(game: MasyuGame): boolean
Parameters
| Name | Type | Description |
|---|---|---|
game | MasyuGame | The current immutable game state. |
Returns
boolean
Whether this Masyu game satisfies its complete native rules.
Examples
import type { MasyuBoard } from "@johnmorrisdotca/kazu/masyu";
import { masyuFinished, newMasyu } from "@johnmorrisdotca/kazu/masyu";
const masyuBoard: MasyuBoard = {"width":5,"height":5,"pearls":[2,1,0,1,2,1,0,0,0,1,2,1,0,1,2,0,0,0,0,0,0,0,0,0,0]};
const masyuGame = newMasyu(masyuBoard);
console.log(masyuFinished(masyuGame));falseWhat it prints (run when this page was built)