CreateOptions型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
インポート
import type { CreateOptions } from "@johnmorrisdotca/houseki/stone-collapse";
定義
interface CreateOptions {
readonly mode?: Exclude<GameMode, 'challenge'>;
readonly preset?: BoardPreset;
readonly width?: number;
readonly height?: number;
readonly colourCount?: 4 | 5 | 6;
readonly seed?: string | number;
readonly shape?: BoardShape;
readonly mask?: readonly boolean[];
readonly dailyDate?: string;
readonly tools?: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
mode (省略可) | "relaxed" | "arcade" | "daily" | undefined | |
preset (省略可) | BoardPreset | undefined | |
width (省略可) | number | undefined | |
height (省略可) | number | undefined | |
colourCount (省略可) | 4 | 5 | 6 | undefined | |
seed (省略可) | string | number | undefined | |
shape (省略可) | BoardShape | undefined | |
mask (省略可) | readonly boolean[] | undefined | Row-major custom active-cell mask. Supply width and height with a custom mask. |
dailyDate (省略可) | string | undefined | Required for Daily; supplied by the host in UTC. |
tools (省略可) | boolean | undefined | Optional Bomb and Pick tray; available only in Relaxed and Arcade. |
例
import type { CreateOptions } from "@johnmorrisdotca/houseki/stone-collapse";
const value: CreateOptions = {seed:"docs"};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'seed' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。