Reference · Tiles, Mexican Train and replay
handSizeForfunction
HOW MANY TILES EACH PLAYER IS DEALT, by the set and the number at the table. Double-twelve's are the figures most published rules give (fifteen each for two to four, twelve for five or six, ten for seven or eight); the other sets are scaled so that at every table some tiles are left to draw.
Import it
import { handSizeFor } from "@johnmorrisdotca/domino";
Definition
function handSizeFor(set: number, players: number): number
Parameters
| Name | Type | Description |
|---|---|---|
set | number | The highest double of the supported set: 9, 12 or 15. |
players | number | Player count, or names in seat order, as specified by this signature. |
Returns
number
HOW MANY TILES EACH PLAYER IS DEALT, by the set and the number at the table. Double-twelve's are the figures most published rules give (fifteen each for two to four, twelve for five or six, ten for seven or eight); the other sets are scaled so that at every table some tiles are left to draw.
Examples
import { handSizeFor } from "@johnmorrisdotca/domino";
console.log(handSizeFor(9,2));10What it prints (run when this page was built)