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 · Magnetic Blocks

FloorScheduletype

A fixed, periodic or authored schedule selecting the floor for committed block placements.

Import it

import type { FloorSchedule } from "@johnmorrisdotca/houseki/magnetic-blocks";

Definition

type FloorSchedule = {
    readonly kind: 'frequent';
} | {
    readonly kind: 'occasional';
} | {
    readonly kind: 'infrequent';
} | {
    readonly kind: 'mid-level';
    readonly placement: number;
} | {
    readonly kind: 'fixed';
    readonly floor: Floor;
} | {
    readonly kind: 'authored';
    readonly magneticPlacements: readonly number[];
    readonly defaultFloor?: Floor;
};

Examples

import type { FloorSchedule } from "@johnmorrisdotca/houseki/magnetic-blocks";

const value: FloorSchedule = {kind:"fixed",floor:"calm"};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[ 'kind', 'floor' ]

What it prints (run when this page was built)

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