undofunction
Restores the full pre-move state in Relaxed or Challenge practice and permanently marks the attempt assisted.
Import it
import { undo } from "@johnmorrisdotca/houseki/stone-collapse";
Definition
function undo(state: GameState): Transition
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
Transition
Restores the full pre-move state in Relaxed or Challenge practice and permanently marks the attempt assisted.
Examples
import { createGame, undo } from "@johnmorrisdotca/houseki/stone-collapse";
const state=createGame({seed:"docs"});
console.log(undo(state).accepted);falseWhat it prints (run when this page was built)