NurikabeMountOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The initial Nurikabe board, native progress, appearance and host event callbacks.
インポート
import type { NurikabeMountOptions } from "@johnmorrisdotca/kazu/nurikabe/play";
定義
type NurikabeMountOptions = NurikabeDrawOptions & {
board: NurikabeBoard;
progress?: string;
onChange?: (game: NurikabeGame) => void;
onFinish?: (game: NurikabeGame) => void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
sea (省略可) | readonly boolean[] | undefined | |
selected (省略可) | number | null | undefined | |
errors (省略可) | readonly number[] | undefined | |
material (省略可) | NurikabeMaterial | undefined | |
pieces (省略可) | NurikabePieces | undefined | |
language (省略可) | NurikabeLanguage | undefined | |
board | NurikabeBoard | |
progress (省略可) | string | undefined | |
onChange (省略可) | ((game: NurikabeGame) => void) | undefined | |
onFinish (省略可) | ((game: NurikabeGame) => void) | undefined |
例
import type { NurikabeBoard } from "@johnmorrisdotca/kazu/nurikabe";
import type { NurikabeMountOptions } from "@johnmorrisdotca/kazu/nurikabe/play";
const nurikabeBoard: NurikabeBoard = {"size":5,"clues":[1,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,2,0,0,3,0,0]};
const value: NurikabeMountOptions = {board:nurikabeBoard};
console.log(value);{
board: {
size: 5,
clues: [
1, 0, 0, 0, 0, 0, 0, 0,
0, 6, 0, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 0, 3, 0,
0
]
}
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。