本文へ移動

Houseki宝石

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

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

目次

リファレンス · ストーンコラプス

CollapseCampaignLevel型

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

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

インポート

import type { CollapseCampaignLevel } from "@johnmorrisdotca/houseki/stone-collapse";

定義

interface CollapseCampaignLevel {
    readonly id: string;
    readonly number: number;
    readonly title: LocalizedText;
    readonly canonicalKeyHash: string;
    readonly width: number;
    readonly height: number;
    readonly colourCount: 4;
    readonly mask?: readonly boolean[];
    readonly seed: string;
    readonly board: readonly (Stone | null)[];
    readonly goal: ChallengeGoal;
    readonly moveLimit: number;
    readonly witness: readonly (readonly number[])[];
    readonly tags: readonly string[];
    readonly rawMetrics: CollapseDifficultyMetrics;
    readonly score: number;
    readonly marks: 1 | 2 | 3 | 4 | 5;
    readonly gradingVersion: string;
    readonly proofStatus: 'engine-witness-verified';
    readonly reviewStatus: 'human-review-pending';
}

メンバー

名前型説明
idstring
numbernumber
titleLocalizedText
canonicalKeyHashstring
widthnumber
heightnumber
colourCount4
mask (省略可)readonly boolean[] | undefined
seedstring
boardreadonly (Stone | null)[]
goalChallengeGoal
moveLimitnumber
witnessreadonly (readonly number[])[]
tagsreadonly string[]
rawMetricsCollapseDifficultyMetrics
scorenumber
marks2 | 4 | 5 | 3 | 1
gradingVersionstring
proofStatus"engine-witness-verified"
reviewStatus"human-review-pending"

例

import { levelManifest } from "@johnmorrisdotca/houseki/stone-collapse";
import type { CollapseCampaignLevel } from "@johnmorrisdotca/houseki/stone-collapse";

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

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

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

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