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