createGamefunction
Makes a free game or a Daily: a Daily's seed is its date, so one date is one game for everybody.
Import it
import { createGame } from "@johnmorrisdotca/houseki/tsumiki";
Definition
function createGame(options?: CreateOptions): GameState
Parameters
| Name | Type | Description |
|---|---|---|
options (optional) | CreateOptions | A seed for a free game, or a mode and a date for a Daily. |
Returns
GameState
A new game, its tray dealt.
Examples
import { createGame } from "@johnmorrisdotca/houseki/tsumiki";
console.log(createGame({ seed: "demo" }).tray.length);3What it prints (run when this page was built)