reshuffledfunction
These cards shuffled again, the same way for the same seed and salt: a pile turned over to make a new stock.
Import it
import { reshuffled } from "@johnmorrisdotca/toranpu";
Definition
function reshuffled(cards: readonly CardId[], seed: number, salt: number): CardId[]
Parameters
| Name | Type | Description |
|---|---|---|
cards | readonly string[] | The cards in their current order. |
seed | number | The numeric seed that reproduces the same shuffle or deal. |
salt | number | The extra value mixed into a seeded shuffle. |
Returns
string[]
These cards shuffled again, the same way for the same seed and salt: a pile turned over to make a new stock.
Examples
import { reshuffled } from "@johnmorrisdotca/toranpu";
console.log(reshuffled(["AS", "KH", "TD"], 42, 1));[ 'AS', 'KH', 'TD' ]What it prints (run when this page was built)