CreateOptionstype
Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.
Import it
import type { CreateOptions } from "@johnmorrisdotca/houseki/magnetic-blocks";
Definition
interface CreateOptions {
readonly mode?: Mode;
readonly width?: number;
readonly height?: number;
readonly colourCount?: 4 | 5 | 6;
readonly seed?: string | number;
readonly mask?: readonly boolean[];
readonly initialBoard?: readonly (Gem | null)[];
readonly bonds?: readonly Bond[];
readonly queue?: readonly (readonly [
Colour,
Colour,
Colour,
Colour
])[];
readonly pieceLimit?: number;
readonly schedule?: FloorSchedule;
readonly floorSwitch?: boolean;
readonly magneticImpact?: boolean;
readonly goal?: Goal;
}
Members
| Name | Type | Description |
|---|---|---|
mode (optional) | Mode | undefined | |
width (optional) | number | undefined | |
height (optional) | number | undefined | |
colourCount (optional) | 4 | 5 | 6 | undefined | |
seed (optional) | string | number | undefined | |
mask (optional) | readonly boolean[] | undefined | |
initialBoard (optional) | readonly (Gem | null)[] | undefined | |
bonds (optional) | readonly Bond[] | undefined | |
queue (optional) | readonly (readonly [Colour, Colour, Colour, Colour])[] | undefined | |
pieceLimit (optional) | number | undefined | |
schedule (optional) | FloorSchedule | undefined | |
floorSwitch (optional) | boolean | undefined | |
magneticImpact (optional) | boolean | undefined | |
goal (optional) | Goal | undefined |
Examples
import type { CreateOptions } from "@johnmorrisdotca/houseki/magnetic-blocks";
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)