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 · Stone Collapse

createLevelfunction

Construct a fresh engine-validated challenge from a content ID or display number.

Import it

import { createLevel } from "@johnmorrisdotca/houseki/stone-collapse";

Definition

function createLevel(id: string | number): GameState

Parameters

NameTypeDescription
idstring | number

A stable content id, or the one-based display number when numbers are accepted.

Returns

GameState

Construct a fresh engine-validated challenge from a content ID or display number.

Examples

import { createLevel } from "@johnmorrisdotca/houseki/stone-collapse";

console.log(createLevel(1).phase);
ready

What it prints (run when this page was built)

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