Reference · Tiles, Mexican Train and replay
isDoublefunction
Both ends the same: a double, which is laid across a train and must be covered.
Import it
import { isDouble } from "@johnmorrisdotca/domino";
Definition
function isDouble(tile: Domino): boolean
Parameters
| Name | Type | Description |
|---|---|---|
tile | number | A canonical tile number: low * 16 + high. |
Returns
boolean
Both ends the same: a double, which is laid across a train and must be covered.
Examples
import { isDouble, tileOf } from "@johnmorrisdotca/domino";
console.log(isDouble(tileOf(6,6)));trueWhat it prints (run when this page was built)