本文へ移動

Houseki宝石

5つの宝石と石のゲームの仕組みを使い、測定したチャレンジやレッスンで遊び、再現できるゲームを保存できます。

宝石(ほうせき)は、宝石や貴石を意味する日本語です。 名前について(英語)

目次

リファレンス · 三つの宝石

CampaignLevel型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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

インポート

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

定義

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';
}

メンバー

名前型説明
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"

例

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' ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/houseki 0.4.2 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。