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

GameEventtype

What a move made happen, for a host to draw or sound.

Import it

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

Definition

type GameEvent = {
    readonly kind: "placed";
    readonly cells: readonly number[];
} | {
    readonly kind: "lines";
    readonly rows: readonly number[];
    readonly columns: readonly number[];
    readonly points: number;
} | {
    readonly kind: "dealt";
} | {
    readonly kind: "ended";
    readonly phase: GamePhase;
};

Examples

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

const value: GameEvent = { kind: "lines", rows: [0], columns: [], points: 10 };
console.log(value.kind);
lines

What it prints (run when this page was built)

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