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 · Falling Triplets

CreateOptionstype

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

Import it

import type { CreateOptions } from "@johnmorrisdotca/houseki/falling-triplets";

Definition

interface CreateOptions {
    readonly mode?: Exclude<Mode, 'challenge'>;
    readonly seed?: string;
    readonly preset?: 'compact' | 'narrow' | 'standard' | 'wide' | 'extraWide' | 'tall' | 'deep' | 'large';
    readonly width?: number;
    readonly height?: number;
    readonly colourCount?: 4 | 5 | 6;
    readonly pieceLimit?: number;
}

Members

NameTypeDescription
mode (optional)"relaxed" | "arcade" | "daily" | undefined
seed (optional)string | undefined
preset (optional)"compact" | "narrow" | "standard" | "wide" | "extraWide" | "tall" | "deep" | "large" | undefined
width (optional)number | undefined
height (optional)number | undefined
colourCount (optional)4 | 5 | 6 | undefined
pieceLimit (optional)number | undefined

Examples

import type { CreateOptions } from "@johnmorrisdotca/houseki/falling-triplets";

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.