Reference · Tiles, Mexican Train and replay
tileWordsfunction
A tile as a person reads it: "6–4", the larger end first, as a tile is named at the table.
Import it
import { tileWords } from "@johnmorrisdotca/domino";
Definition
function tileWords(tile: Domino): string
Parameters
| Name | Type | Description |
|---|---|---|
tile | number | A canonical tile number: low * 16 + high. |
Returns
string
A tile as a person reads it: "6–4", the larger end first, as a tile is named at the table.
Examples
import { tileOf, tileWords } from "@johnmorrisdotca/domino";
console.log(tileWords(tileOf(6,4)));6–4What it prints (run when this page was built)