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

Randomtype

A number in [0, 1), like Math.random, from a stream a seed fixes.

Import it

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

Definition

type Random = () => number;

Examples

import type { Random } from "@johnmorrisdotca/domino";
import { seededRandom } from "@johnmorrisdotca/domino";

const value: Random = seededRandom(42);
console.log(value);
[Function (anonymous)]

What it prints (run when this page was built)

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