runUndofunction
Take the last move back, where the rules allow undo: the new game, or null. The clock is not given back, and score is.
Import it
import { runUndo } from "@johnmorrisdotca/jarajara/awase";
Definition
function runUndo(run: AwaseRun, at: number): AwaseRun | null
Parameters
| Name | Type | Description |
|---|---|---|
run | AwaseRun | The current immutable native challenge run. |
at | number | The supplied time in milliseconds, or the zero-based seat index specified by the signature. |
Returns
AwaseRun | null
Take the last move back, where the rules allow undo: the new game, or null. The clock is not given back, and score is.
Examples
import { generateAwase, runUndo, startRun } from "@johnmorrisdotca/jarajara/awase";
const deal = generateAwase(4,"easy",2026);
const run = startRun(deal,{},0);
console.log(runUndo(run,1000));nullWhat it prints (run when this page was built)