Reference · Game engine and table
reshuffledHitotsufunction
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 { reshuffledHitotsu } from "@johnmorrisdotca/hitotsu";
Definition
function reshuffledHitotsu(cards: readonly HitotsuCard[], seed: number, salt: number): HitotsuCard[]
Parameters
| Name | Type | Description |
|---|---|---|
cards | readonly string[] | The cards to reshuffle, in their current order. |
seed | number | The numeric seed that reproduces the same random sequence or deal. |
salt | number | The extra integer mixed with the seed for this reshuffle. |
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 { reshuffledHitotsu } from "@johnmorrisdotca/hitotsu";
console.log(reshuffledHitotsu(["R70", "B20", "WW0"], 42, 1));[ 'R70', 'B20', 'WW0' ]What it prints (run when this page was built)