Reference · Playable number grid
ShikakuMountOptionstype
The initial Shikaku board, native progress, appearance and host event callbacks.
Import it
import type { ShikakuMountOptions } from "@johnmorrisdotca/kazu/play";
Also exported from: @johnmorrisdotca/kazu/shikaku/play
Definition
type ShikakuMountOptions = ShikakuDrawOptions & {
board: ShikakuBoard;
progress?: string;
onChange?: (game: ShikakuGame) => void;
onFinish?: (game: ShikakuGame) => void;
};
Members
| Name | Type | Description |
|---|---|---|
rectangles (optional) | readonly ShikakuRectangle[] | undefined | |
selected (optional) | number | null | undefined | |
anchor (optional) | number | null | undefined | |
errors (optional) | readonly number[] | undefined | |
material (optional) | ShikakuMaterial | undefined | |
pieces (optional) | ShikakuPieces | undefined | |
language (optional) | ShikakuLanguage | undefined | |
board | ShikakuBoard | |
progress (optional) | string | undefined | |
onChange (optional) | ((game: ShikakuGame) => void) | undefined | |
onFinish (optional) | ((game: ShikakuGame) => void) | undefined |
Examples
import type { ShikakuBoard } from "@johnmorrisdotca/kazu/shikaku";
import type { ShikakuMountOptions } from "@johnmorrisdotca/kazu/play";
const shikakuBoard: ShikakuBoard = {"width":5,"height":5,"clues":[3,0,0,0,2,0,0,0,0,4,0,0,0,0,0,0,0,0,0,3,4,3,6,0,0]};
const value: ShikakuMountOptions = {board:shikakuBoard};
console.log(value);{
board: {
width: 5,
height: 5,
clues: [
3, 0, 0, 0, 2, 0, 0, 0,
0, 4, 0, 0, 0, 0, 0, 0,
0, 0, 0, 3, 4, 3, 6, 0,
0
]
}
}What it prints (run when this page was built)