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

handSizeForfunction

HOW MANY TILES EACH PLAYER IS DEALT, by the set and the number at the table. Double-twelve's are the figures most published rules give (fifteen each for two to four, twelve for five or six, ten for seven or eight); the other sets are scaled so that at every table some tiles are left to draw.

Import it

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

Definition

function handSizeFor(set: number, players: number): number

Parameters

NameTypeDescription
setnumber

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

playersnumber

Player count, or names in seat order, as specified by this signature.

Returns

number

HOW MANY TILES EACH PLAYER IS DEALT, by the set and the number at the table. Double-twelve's are the figures most published rules give (fifteen each for two to four, twelve for five or six, ten for seven or eight); the other sets are scaled so that at every table some tiles are left to draw.

Examples

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

console.log(handSizeFor(9,2));
10

What it prints (run when this page was built)

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