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 · Gem Swap

GemSwapCampaignLeveltype

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

Import it

import type { GemSwapCampaignLevel } from "@johnmorrisdotca/houseki/gem-swap";

Definition

interface GemSwapCampaignLevel {
    readonly id: string;
    readonly number: number;
    readonly title: {
        readonly en: string;
        readonly ja: string;
    };
    readonly options: CreateOptions;
    readonly width: number;
    readonly height: number;
    readonly colourCount: number;
    readonly seed: number;
    readonly challenge: NonNullable<CreateOptions['challenge']>;
    readonly witness: readonly ReplayOperation[];
    readonly canonicalKeyHash: string;
    readonly tags: readonly string[];
    readonly rawMetrics: Readonly<Record<string, number>>;
    readonly difficultyScore: number;
    readonly difficultyMarks: number;
    readonly gradingVersion: string;
    readonly proofStatus: 'engine-witness-verified';
    readonly reviewStatus: GemSwapReviewStatus;
}

Members

NameTypeDescription
idstring
numbernumber
title{ readonly en: string; readonly ja: string; }
optionsCreateOptions
widthnumber
heightnumber
colourCountnumber
seednumber
challengeChallengeRules
witnessreadonly ReplayOperation[]
canonicalKeyHashstring
tagsreadonly string[]
rawMetricsReadonly<Record<string, number>>
difficultyScorenumber
difficultyMarksnumber
gradingVersionstring
proofStatus"engine-witness-verified"
reviewStatus"human-review-pending"

Examples

import { GEM_SWAP_CAMPAIGN } from "@johnmorrisdotca/houseki/gem-swap";
import type { GemSwapCampaignLevel } from "@johnmorrisdotca/houseki/gem-swap";

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

What it prints (run when this page was built)

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