createChallengefunction
Creates a challenge after validating its authored board, finite queue, goal, and witness.
Import it
import { createChallenge } from "@johnmorrisdotca/houseki/falling-triplets";
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 challenge after validating its authored board, finite queue, goal, and witness.
Examples
import { createChallenge } from "@johnmorrisdotca/houseki/falling-triplets";
console.log(createChallenge({width:6,height:12,board:Array(72).fill(null),queue:[["red","green","blue"],["blue","red","green"]],goal:{type:"empty"}}).phase);fallingWhat it prints (run when this page was built)