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

roundsForfunction

How many rounds a game of this length plays with this set: one per double, top to blank, or the first half of them.

Import it

import { roundsFor } from "@johnmorrisdotca/domino";

Definition

function roundsFor(set: number, length: TrainLength): number

Parameters

NameTypeDescription
setnumber

The highest double of the supported set: 9, 12 or 15.

lengthTrainLength

Full descending-double rounds or the short half-length game.

Returns

number

How many rounds a game of this length plays with this set: one per double, top to blank, or the first half of them.

Examples

import { roundsFor } from "@johnmorrisdotca/domino";

console.log(roundsFor(9,"short"));
5

What it prints (run when this page was built)

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