Reference · Game engine and table
shuffledHitotsufunction
The deck shuffled for one hand of one game: the same seed and hand always the same order.
Import it
import { shuffledHitotsu } from "@johnmorrisdotca/hitotsu";
Definition
function shuffledHitotsu(seed: number, hand: number): HitotsuCard[]
Parameters
| Name | Type | Description |
|---|---|---|
seed | number | The numeric seed that reproduces the same random sequence or deal. |
hand | number | The hand number for deterministic shuffling, or the held cards where an array is accepted. |
Returns
string[]
The deck shuffled for one hand of one game: the same seed and hand always the same order.
Examples
import { shuffledHitotsu } from "@johnmorrisdotca/hitotsu";
console.log(shuffledHitotsu(42, 0).slice(0, 7));[
'BD0', 'B80',
'G61', 'R00',
'WF2', 'B20',
'G00'
]What it prints (run when this page was built)