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

TsumikiLeveltype

One graded level: its seed, goal and stones, and a line of moves the engine has been shown to win with.

Import it

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

Definition

interface TsumikiLevel {
    readonly id: string;
    readonly number: number;
    readonly title: LocalizedText;
    readonly seed: string;
    readonly goal: ChallengeGoal;
    readonly stones: readonly number[];
    readonly witness: readonly (readonly [
        number,
        number,
        number
    ])[];
    readonly marks: 1 | 2 | 3 | 4 | 5;
}

Members

NameTypeDescription
idstring
numbernumber
titleLocalizedText
seedstring
goalChallengeGoal
stonesreadonly number[]
witnessreadonly (readonly [number, number, number])[]

The winning moves, each [slot, row, column].

marks4 | 5 | 3 | 1 | 2

Examples

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

const value: TsumikiLevel = levelManifest[0]!;
console.log(value.number);
1

What it prints (run when this page was built)

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