restartGamefunction
Restarts the same seed, custom starting board, fixed queue, rules and floor options.
Import it
import { restartGame } from "@johnmorrisdotca/houseki/magnetic-blocks";
Definition
function restartGame(state: GameState): GameState
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
GameState
Restarts the same seed, custom starting board, fixed queue, rules and floor options.
Examples
import { createGame, restartGame } from "@johnmorrisdotca/houseki/magnetic-blocks";
const state=createGame({seed:"docs"});
console.log(restartGame(state).phase);fallingWhat it prints (run when this page was built)