本文へ移動

Houseki宝石

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

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

目次

リファレンス · 積み木

GameSettings型

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

How a game was set up, the whole of what a replay needs but the moves.

インポート

import type { GameSettings } from "@johnmorrisdotca/houseki/tsumiki";

定義

interface GameSettings {
    readonly mode: GameMode;
    readonly seed: string;
    readonly width: number;
    readonly height: number;
    readonly dailyDate?: string;
    readonly challengeId?: string;
    readonly goal?: ChallengeGoal;
    readonly stones?: readonly number[];
}

メンバー

名前型説明
modeGameMode
seedstring
widthnumber
heightnumber
dailyDate (省略可)string | undefined
challengeId (省略可)string | undefined
goal (省略可)ChallengeGoal | undefined
stones (省略可)readonly number[] | undefined

The stones a challenge starts with, as cell indices.

例

import { createGame } from "@johnmorrisdotca/houseki/tsumiki";
import type { GameSettings } from "@johnmorrisdotca/houseki/tsumiki";

const value: GameSettings = createGame({ seed: "demo" }).settings;
console.log(value.mode);
relaxed

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

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

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