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 · Shizen and Arashi environments

AttractionPairPreviewtype

A pure attraction decision including the paired ids, axis, gap, midpoint and moves.

Import it

import type { AttractionPairPreview } from "@johnmorrisdotca/houseki/nature";

Definition

interface AttractionPairPreview {
    readonly ids: readonly [
        number,
        number
    ];
    readonly axis: 'horizontal' | 'vertical';
    readonly emptyGap: number;
    readonly midpoint: {
        readonly x: number;
        readonly y: number;
    };
    readonly anchoredId?: number;
    readonly moves: readonly NatureMove[];
}

Members

NameTypeDescription
idsreadonly [number, number]
axis"horizontal" | "vertical"
emptyGapnumber
midpoint{ readonly x: number; readonly y: number; }
anchoredId (optional)number | undefined
movesreadonly NatureMove[]

Examples

import type { AttractionPairPreview } from "@johnmorrisdotca/houseki/nature";

const value: AttractionPairPreview = {ids:[1,2],axis:"horizontal",emptyGap:1,midpoint:{x:1,y:1},moves:[]};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[ 'ids', 'axis', 'emptyGap', 'midpoint', 'moves' ]

What it prints (run when this page was built)

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