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

getLevelfunction

Looks a level up by its id or its display number; null where there is none.

Import it

import { getLevel } from "@johnmorrisdotca/houseki/tsumiki";

Definition

function getLevel(idOrNumber: string | number): TsumikiLevel | null

Parameters

NameTypeDescription
idOrNumberstring | number

A level's id or display number.

Returns

TsumikiLevel | null

The level, or null where there is no such level.

Examples

import { getLevel } from "@johnmorrisdotca/houseki/tsumiki";
console.log(getLevel(1)?.number);
1

What it prints (run when this page was built)

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