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

Piecetype

A shape in the tray: its name, its colour, and its cells as row and column from its own top left.

Import it

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

Definition

interface Piece {
    readonly shape: string;
    readonly colour: BlockColour;
    readonly cells: readonly (readonly [
        number,
        number
    ])[];
}

Members

NameTypeDescription
shapestring
colourBlockColour
cellsreadonly (readonly [number, number])[]

Examples

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

const value: Piece = { shape: "bar-2", colour: "blue", cells: [[0, 0], [0, 1]] };
console.log(value.cells.length);
2

What it prints (run when this page was built)

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