createGamefunction
Creates a deterministic stable board with at least one legal normal swap.
Import it
import { createGame } from "@johnmorrisdotca/houseki/gem-swap";
Definition
function createGame(options?: CreateOptions): GameState
Parameters
| Name | Type | Description |
|---|---|---|
options (optional) | CreateOptions | Validated native creation, authored challenge, or environment options described by this signature. |
Returns
GameState
Creates a deterministic stable board with at least one legal normal swap.
Examples
import { createGame } from "@johnmorrisdotca/houseki/gem-swap";
console.log(createGame({seed:"docs"}).phase);readyWhat it prints (run when this page was built)