Reference · Game engine and table
longestColourfunction
The colour this hand holds most of, red first among equals so the choice is always the same.
Import it
import { longestColour } from "@johnmorrisdotca/hitotsu";
Definition
function longestColour(hand: readonly HitotsuCard[]): HitotsuColour
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly string[] | The hand number for deterministic shuffling, or the held cards where an array is accepted. |
Returns
HitotsuColour
The colour this hand holds most of, red first among equals so the choice is always the same.
Examples
import { longestColour } from "@johnmorrisdotca/hitotsu";
console.log(longestColour(["R70", "R20", "B50"]));RWhat it prints (run when this page was built)