runShufflefunction
Shuffle what is left, which is for when no pair can be taken: the new game, or null where it may not be (a pair can still be taken, none is left to use, or no shuffle would help).
Import it
import { runShuffle } from "@johnmorrisdotca/jarajara/awase";
Definition
function runShuffle(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
Shuffle what is left, which is for when no pair can be taken: the new game, or null where it may not be (a pair can still be taken, none is left to use, or no shuffle would help).
Examples
import { generateAwase, runShuffle, startRun } from "@johnmorrisdotca/jarajara/awase";
const deal = generateAwase(4,"easy",2026);
const run = startRun(deal,{},0);
console.log(runShuffle(run,1000));nullWhat it prints (run when this page was built)