Reference · Tiles, Mexican Train and replay
laidAgainstfunction
The tile laid against end: turned so that end touches, the other one left open.
Import it
import { laidAgainst } from "@johnmorrisdotca/domino";
Definition
function laidAgainst(tile: Domino, end: number): LaidDomino
Parameters
| Name | Type | Description |
|---|---|---|
tile | number | A canonical tile number: low * 16 + high. |
end | number | The pip value the next laid tile must match. |
Returns
number
The tile laid against end: turned so that end touches, the other one left open.
Examples
import { laidAgainst, tileOf } from "@johnmorrisdotca/domino";
console.log(laidAgainst(tileOf(6,4),6));100What it prints (run when this page was built)