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 · Tsumiki

GameSettingstype

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

Import it

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

Definition

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

Members

NameTypeDescription
modeGameMode
seedstring
widthnumber
heightnumber
dailyDate (optional)string | undefined
challengeId (optional)string | undefined
goal (optional)ChallengeGoal | undefined
stones (optional)readonly number[] | undefined

The stones a challenge starts with, as cell indices.

Examples

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

What it prints (run when this page was built)

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