本文へ移動

Houseki宝石

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

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

目次

リファレンス · 色の連鎖

ChainCampaignLevel型

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

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

インポート

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

定義

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

メンバー

名前型説明
idstring
numbernumber
titleLocalizedText
objective (省略可)LocalizedText | undefined
nature (省略可)true | undefined
weather (省略可)"frequent" | undefined
magneticQueue (省略可)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 (省略可)"entry" | "easy" | "intermediate" | "hard" | "expert" | undefined
rawDifficultyScore (省略可)number | undefined
normalizationCategory (省略可)string | undefined

例

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

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

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

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