Skip to the content

Dominoドミノ

Deal seeded dominoes, play Mexican Train with native rules and computers, and replay a saved game.

Domino is the Japanese borrowed word ドミノ for dominoes. About the name

Contents

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

NameTypeDescription
tilenumber

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)));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/domino 1.1.4.