CreateOptionstype
Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
Import it
import type { CreateOptions } from "@johnmorrisdotca/houseki/stone-collapse";
Definition
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;
}
Members
| Name | Type | Description |
|---|---|---|
mode (optional) | "relaxed" | "arcade" | "daily" | undefined | |
preset (optional) | BoardPreset | undefined | |
width (optional) | number | undefined | |
height (optional) | number | undefined | |
colourCount (optional) | 4 | 5 | 6 | undefined | |
seed (optional) | string | number | undefined | |
shape (optional) | BoardShape | undefined | |
mask (optional) | readonly boolean[] | undefined | Row-major custom active-cell mask. Supply width and height with a custom mask. |
dailyDate (optional) | string | undefined | Required for Daily; supplied by the host in UTC. |
tools (optional) | boolean | undefined | Optional Bomb and Pick tray; available only in Relaxed and Arcade. |
Examples
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' ]What it prints (run when this page was built)