Reference · Tiles, Mexican Train and replay
endsOffunction
A tile's two ends, the smaller first.
Import it
import { endsOf } from "@johnmorrisdotca/domino";
Definition
function endsOf(tile: Domino): [number, number]
Parameters
| Name | Type | Description |
|---|---|---|
tile | number | A canonical tile number: low * 16 + high. |
Returns
[number, number]
A tile's two ends, the smaller first.
Examples
import { endsOf, tileOf } from "@johnmorrisdotca/domino";
console.log(endsOf(tileOf(6,4)));[ 4, 6 ]What it prints (run when this page was built)