Skip to the content

Houseki宝石

Run five native gem and stone engines, play measured challenges and lessons, and save deterministic games.

Houseki (宝石) is Japanese for a gem or precious stone. About the name

Contents

Reference · Colour Chains

CreateOptionstype

Creation settings for this native engine; dimensions, mode, seed and optional mechanics are validated together.

Import it

import type { CreateOptions } from "@johnmorrisdotca/houseki/colour-chains";

Definition

interface CreateOptions {
    readonly mode?: Exclude<Mode, 'challenge'>;
    readonly seed?: string;
    readonly dailyDate?: string;
    readonly preset?: Preset;
    readonly width?: number;
    readonly height?: number;
    readonly colourCount?: 4 | 5 | 6;
    readonly pairLimit?: number;
    readonly nature?: boolean;
    readonly weather?: WeatherSchedule;
}

Members

NameTypeDescription
mode (optional)"relaxed" | "arcade" | "daily" | undefined
seed (optional)string | undefined
dailyDate (optional)string | undefined
preset (optional)Preset | undefined
width (optional)number | undefined
height (optional)number | undefined
colourCount (optional)4 | 5 | 6 | undefined
pairLimit (optional)number | undefined
nature (optional)boolean | undefined
weather (optional)WeatherSchedule | undefined

Examples

import type { CreateOptions } from "@johnmorrisdotca/houseki/colour-chains";

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/houseki 0.4.2.