createChallengefunction
Makes an authored game from its seed, goal and stones.
Import it
import { createChallenge } from "@johnmorrisdotca/houseki/tsumiki";
Definition
function createChallenge(options: ChallengeOptions): GameState
Parameters
| Name | Type | Description |
|---|---|---|
options | ChallengeOptions | The game's identity, seed, goal and stones. |
Returns
GameState
A new game of that challenge.
Examples
import { createChallenge } from "@johnmorrisdotca/houseki/tsumiki";
console.log(createChallenge({ id: "one", seed: "s", goal: { kind: "lines", target: 1 } }).settings.mode);challengeWhat it prints (run when this page was built)