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

CampaignLeveltype

One authored native challenge with its stable id, setup, winning witness, measurements and review status.

Import it

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

Definition

interface CampaignLevel {
    readonly id: string;
    readonly seed: string;
    readonly number: number;
    readonly title: LocalizedText;
    readonly canonicalKeyHash: string;
    readonly width: number;
    readonly height: number;
    readonly colourCount: 4 | 5 | 6;
    readonly goal: ChallengeGoal;
    readonly board: readonly (Gem | null)[];
    readonly queue: readonly Triplet[];
    readonly witness: readonly ChallengeHint[];
    readonly tags: readonly string[];
    readonly rawMetrics: DifficultyMetrics;
    readonly score: number;
    readonly marks: 1 | 2 | 3 | 4 | 5;
    readonly gradingVersion: string;
    readonly proofStatus: 'engine-witness-verified';
    readonly reviewStatus: 'human-review-pending' | 'human-reviewed';
}

Members

NameTypeDescription
idstring
seedstring
numbernumber
titleLocalizedText
canonicalKeyHashstring

SHA-256 fingerprint of the colour- and mirror-canonical duplicate key.

widthnumber
heightnumber
colourCount4 | 5 | 6
goalChallengeGoal
boardreadonly (Gem | null)[]
queuereadonly Triplet[]
witnessreadonly ChallengeHint[]
tagsreadonly string[]
rawMetricsDifficultyMetrics
scorenumber
marks2 | 4 | 5 | 3 | 1
gradingVersionstring
proofStatus"engine-witness-verified"
reviewStatus"human-review-pending" | "human-reviewed"

Examples

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

const level=levelManifest[0];
const value: CampaignLevel = level;
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[ 'id', 'seed', 'number', 'width', 'height', 'colourCount' ]

What it prints (run when this page was built)

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