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