CreateOptionstype
Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
Import it
import type { CreateOptions } from "@johnmorrisdotca/houseki/gem-swap";
Definition
interface CreateOptions {
readonly preset?: BoardPreset;
readonly width?: number;
readonly height?: number;
readonly colourCount?: 4 | 5 | 6;
readonly seed?: string | number;
readonly tools?: boolean;
readonly advancedTools?: boolean;
readonly shape?: BoardShape;
readonly mask?: readonly boolean[];
readonly mode?: GameMode;
readonly dailyDate?: string;
readonly challenge?: ChallengeRules;
}
Members
| Name | Type | Description |
|---|---|---|
preset (optional) | BoardPreset | undefined | |
width (optional) | number | undefined | |
height (optional) | number | undefined | |
colourCount (optional) | 4 | 5 | 6 | undefined | |
seed (optional) | string | number | undefined | |
tools (optional) | boolean | undefined | |
advancedTools (optional) | boolean | undefined | |
shape (optional) | BoardShape | undefined | |
mask (optional) | readonly boolean[] | undefined | Row-major active-cell mask. Requires explicit custom dimensions. |
mode (optional) | GameMode | undefined | |
dailyDate (optional) | string | undefined | Required for Daily; a UTC calendar date in YYYY-MM-DD form. |
challenge (optional) | ChallengeRules | undefined | Challenge-only finite goals and optional legal-swap budget. |
Examples
import type { CreateOptions } from "@johnmorrisdotca/houseki/gem-swap";
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)