Reference · Rules, tiles and records
lengthRowsfunction
For one opening hand, each length of game: how many tiles it deals, from one set and from two, and how many are wild at each level.
Import it
import { lengthRows } from "@johnmorrisdotca/kumimoji";
Definition
function lengthRows(hand?: number): LengthRow[]
Parameters
| Name | Type | Description |
|---|---|---|
hand (optional) | number | The hand size or tile codes, as declared by the function signature. |
Returns
LengthRow[]
For one opening hand, each length of game: how many tiles it deals, from one set and from two, and how many are wild at each level.
Examples
import { lengthRows } from "@johnmorrisdotca/kumimoji";
console.log(lengthRows(7));[
{
length: 'short',
tiles: 40,
doubleTiles: 80,
wilds: { easy: 6, medium: 3, hard: 0 }
},
{
length: 'medium',
tiles: 72,
doubleTiles: 144,
wilds: { easy: 11, medium: 5, hard: 0 }
},
{
length: 'full',
tiles: 144,
doubleTiles: 288,
wilds: { easy: 22, medium: 11, hard: 0 }
}
]What it prints (run when this page was built)