ShikakuMountOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The initial Shikaku board, native progress, appearance and host event callbacks.
インポート
import type { ShikakuMountOptions } from "@johnmorrisdotca/kazu/play";
ほかのエクスポート元: @johnmorrisdotca/kazu/shikaku/play
定義
type ShikakuMountOptions = ShikakuDrawOptions & {
board: ShikakuBoard;
progress?: string;
onChange?: (game: ShikakuGame) => void;
onFinish?: (game: ShikakuGame) => void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
rectangles (省略可) | readonly ShikakuRectangle[] | undefined | |
selected (省略可) | number | null | undefined | |
anchor (省略可) | number | null | undefined | |
errors (省略可) | readonly number[] | undefined | |
material (省略可) | ShikakuMaterial | undefined | |
pieces (省略可) | ShikakuPieces | undefined | |
language (省略可) | ShikakuLanguage | undefined | |
board | ShikakuBoard | |
progress (省略可) | string | undefined | |
onChange (省略可) | ((game: ShikakuGame) => void) | undefined | |
onFinish (省略可) | ((game: ShikakuGame) => void) | undefined |
例
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
]
}
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。