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
| Name | Type | Description |
|---|---|---|
options | ChallengeOptions | 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);readyWhat it prints (run when this page was built)