restartGamefunction
The same game from its start, with the same settings.
Import it
import { restartGame } from "@johnmorrisdotca/houseki/tsumiki";
Definition
function restartGame(state: GameState): GameState
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The game to begin again. |
Returns
GameState
A new game with the same settings.
Examples
import { createGame, restartGame } from "@johnmorrisdotca/houseki/tsumiki";
console.log(restartGame(createGame({ seed: "demo" })).moves);0What it prints (run when this page was built)