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

ChainCampaignLeveltype

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

Import it

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

Definition

interface ChainCampaignLevel {
    readonly id: string;
    readonly number: number;
    readonly title: LocalizedText;
    readonly objective?: LocalizedText;
    readonly nature?: true;
    readonly weather?: 'frequent';
    readonly magneticQueue?: readonly (readonly [
        boolean,
        boolean
    ])[];
    readonly canonicalKeyHash: string;
    readonly width: number;
    readonly height: number;
    readonly colourCount: 4 | 5 | 6;
    readonly seed: string;
    readonly board: readonly (Gem | null)[];
    readonly queue: readonly (readonly [
        Colour,
        Colour
    ])[];
    readonly goal: ChallengeGoal;
    readonly witness: readonly WitnessStep[];
    readonly tags: readonly string[];
    readonly rawMetrics: ChainDifficultyMetrics;
    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';
    readonly band?: 'entry' | 'easy' | 'intermediate' | 'hard' | 'expert';
    readonly rawDifficultyScore?: number;
    readonly normalizationCategory?: string;
}

Members

NameTypeDescription
idstring
numbernumber
titleLocalizedText
objective (optional)LocalizedText | undefined
nature (optional)true | undefined
weather (optional)"frequent" | undefined
magneticQueue (optional)readonly (readonly [boolean, boolean])[] | undefined
canonicalKeyHashstring
widthnumber
heightnumber
colourCount4 | 5 | 6
seedstring
boardreadonly (Gem | null)[]
queuereadonly (readonly [Colour, Colour])[]
goalChallengeGoal
witnessreadonly WitnessStep[]
tagsreadonly string[]
rawMetricsChainDifficultyMetrics
scorenumber
marks2 | 4 | 5 | 3 | 1
gradingVersionstring
proofStatus"engine-witness-verified"
reviewStatus"human-review-pending" | "human-reviewed"
band (optional)"entry" | "easy" | "intermediate" | "hard" | "expert" | undefined
rawDifficultyScore (optional)number | undefined
normalizationCategory (optional)string | undefined

Examples

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

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

What it prints (run when this page was built)

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