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

RoundResulttype

A round's result, kept for the table of scores.

Import it

import type { RoundResult } from "@johnmorrisdotca/domino";

Definition

type RoundResult = {
    engine: number;
    pips: readonly number[];
    ending: RoundEnding;
    out: TrainSeat | null;
};

Members

NameTypeDescription
enginenumber

The round's engine double, by its number: 12 for double-twelve.

pipsreadonly number[]

Pips left in each seat's hand when it ended: that round's score.

endingRoundEnding
outnumber | null

The seat that played out, on a round that ended that way.

Examples

import type { RoundResult } from "@johnmorrisdotca/domino";

const value: RoundResult = {engine:9,pips:[0,12],ending:"domino",out:0};
console.log(value);
{ engine: 9, pips: [ 0, 12 ], ending: 'domino', out: 0 }

What it prints (run when this page was built)

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