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

createChallengefunction

Creates a fixed witnessed challenge after validating its board, objective, move budget, and every witness group.

Import it

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

Definition

function createChallenge(options: ChallengeOptions): GameState

Parameters

NameTypeDescription
optionsChallengeOptions

Validated native creation, authored challenge, or environment options described by this signature.

Returns

GameState

Creates a fixed witnessed challenge after validating its board, objective, move budget, and every witness group.

Examples

import { createChallenge, levelManifest } from "@johnmorrisdotca/houseki/stone-collapse";

const level=levelManifest[0];
console.log(createChallenge({id:level.id,seed:level.seed,width:level.width,height:level.height,colourCount:level.colourCount,initialBoard:level.board,goal:level.goal,moveLimit:level.moveLimit,witness:level.witness}).phase);
ready

What it prints (run when this page was built)

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