Domino documentation
Domino ドミノ — Dominoes and Mexican Train
Deal seeded dominoes, play Mexican Train with native rules and computers, and replay a saved game.
Install
npm install @johnmorrisdotca/domino
Start here
Entry points
| Import it | What it is | Size |
|---|---|---|
@johnmorrisdotca/Sound controls · 10 exports | THE SOUNDS OF A DOMINO TABLE: tiles shuffled, a tile drawn from the boneyard, a tile laid, a knock on the table for a pass. | 19.3 kB |
@johnmorrisdotca/Recorded sounds · 2 exports | 17.3 kB | |
@johnmorrisdotca/Tiles, Mexican Train and replay · 75 exports | Domino: double-nine, double-twelve and double-fifteen sets of dominoes, and Mexican Train with a computer player and a saved-game format. | 9.9 kB |
Guides
How-to
- Read tiles and legal playsUse canonical tile numbers and let the rules choose actions.
- Let the computers playAdvance deterministic legal turns with an explicit host limit.
- Save and replay a gameValidate a recorded game by replaying its native moves.
- Use the command lineDeal, play, check and replay through the same native rules.
- Name seats and announce movesUse the package words for the state your table actually has.
Explanation
- Sound loading and host controlsUnderstand lazy recordings, mute and audio cleanup.
- Architecture and replayFollow immutable state and the authoritative move record.