Reference · Tiles, Mexican Train and replay
handPipsfunction
The pips in a hand, which count against its holder when the round ends.
Import it
import { handPips } from "@johnmorrisdotca/domino";
Definition
function handPips(hand: readonly Domino[]): number
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly number[] | The canonical tile numbers in one hand. |
Returns
number
The pips in a hand, which count against its holder when the round ends.
Examples
import { handPips, startTrain } from "@johnmorrisdotca/domino";
const game = startTrain(9,["A","B"],42,{length:"short",doubles:"one",mexican:"any"},[false,true])!;
console.log(handPips(game.hands[0]));107What it prints (run when this page was built)