Reference · Rules, tiles and records
partyLengthfunction
The game length a set-up plays at: the one chosen where the bag holds this many players, else the shortest that does, so a choice made for fewer players comes back when there are fewer again. A Full bag of one set is 144 tiles, and eight Classic hands with a round of draws are 96, so there is always one.
Import it
import { partyLength } from "@johnmorrisdotca/kumimoji";
Definition
function partyLength(players: number, hand: number, chosen: KumimojiLength, doubleSet: boolean): KumimojiLength
Parameters
| Name | Type | Description |
|---|---|---|
players | number | The requested player count or current player rows. |
hand | number | The hand size or tile codes, as declared by the function signature. |
chosen | KumimojiLength | The selected game length. |
doubleSet | boolean | Whether to use two English tile sets. |
Returns
KumimojiLength
The game length a set-up plays at: the one chosen where the bag holds this many players, else the shortest that does, so a choice made for fewer players comes back when there are fewer again. A Full bag of one set is 144 tiles, and eight Classic hands with a round of draws are 96, so there is always one.
Examples
import { partyLength } from "@johnmorrisdotca/kumimoji";
console.log(partyLength(8,11,"short",false));fullWhat it prints (run when this page was built)