YajilinMountOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The initial Yajilin board, native progress, appearance and host event callbacks.
インポート
import type { YajilinMountOptions } from "@johnmorrisdotca/kazu/yajilin";
ほかのエクスポート元: @johnmorrisdotca/kazu/yajilin/play, @johnmorrisdotca/kazu
定義
type YajilinMountOptions = YajilinDrawOptions & {
board: YajilinBoard;
progress?: string;
onChange?: (game: YajilinGame) => void;
onFinish?: (game: YajilinGame) => void;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
shaded (省略可) | readonly boolean[] | undefined | |
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 | YajilinBoard | |
progress (省略可) | string | undefined | |
onChange (省略可) | ((game: YajilinGame) => void) | undefined | |
onFinish (省略可) | ((game: YajilinGame) => void) | undefined |
例
import type { YajilinBoard, YajilinMountOptions } from "@johnmorrisdotca/kazu/yajilin";
const yajilinBoard: YajilinBoard = {"width":5,"height":5,"clues":[{"direction":"left","count":0},null,{"direction":"right","count":1},null,{"direction":"up","count":0},null,null,null,null,null,{"direction":"right","count":0},null,{"direction":"left","count":0},null,{"direction":"down","count":1},{"direction":"left","count":0},null,null,null,null,null,{"direction":"up","count":1},{"direction":"down","count":0},null,{"direction":"down","count":0}]};
const value: YajilinMountOptions = {board:yajilinBoard};
console.log(value);{
board: {
width: 5,
height: 5,
clues: [
[Object], null, [Object],
null, [Object], null,
null, null, null,
null, [Object], null,
[Object], null, [Object],
[Object], null, null,
null, null, null,
[Object], [Object], null,
[Object]
]
}
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。