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 · Colour Chains

createChallengefunction

Validates and creates a finite witnessed challenge. Hints use only the supplied verified pair placements.

Import it

import { createChallenge } from "@johnmorrisdotca/houseki/colour-chains";

Definition

function createChallenge(options: ChallengeOptions): GameState

Parameters

NameTypeDescription
optionsChallengeOptions

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

Returns

GameState

Validates and creates a finite witnessed challenge. Hints use only the supplied verified pair placements.

Examples

import { createChallenge, levelManifest } from "@johnmorrisdotca/houseki/colour-chains";

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

What it prints (run when this page was built)

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