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

NatureOptionsErrorclass

A typed native grid, cell, marking or power-drop validation error.

Import it

import { NatureOptionsError } from "@johnmorrisdotca/houseki/nature";

Definition

class NatureOptionsError
new NatureOptionsError(code: NatureErrorCode, message: string): NatureOptionsError

Parameters

NameTypeDescription
codeNatureErrorCode

The native stable error code used by callers to distinguish setup or replay failures.

messagestring

The human-readable diagnostic accompanying the native code.

Members

NameTypeDescription
codeNatureErrorCode
namestring
messagestring
stack (optional)string | undefined
cause (optional)unknown

Examples

import { NatureOptionsError } from "@johnmorrisdotca/houseki/nature";

const error=new NatureOptionsError("invalid-grid-size","Invalid example setup");
console.log(error.name,error.code,error.message);
NatureOptionsError invalid-grid-size Invalid example setup

What it prints (run when this page was built)

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