Reference · Tiles, Mexican Train and replay
DominoStringstype
The names of the strings. Each is one line or one block of text.
Import it
import type { DominoStrings } from "@johnmorrisdotca/domino";
Definition
type DominoStrings = {
set9: string;
set12: string;
set15: string;
lengthFull: string;
lengthShort: string;
doublesOne: string;
doublesChain: string;
mexicanAny: string;
mexicanOwnFirst: string;
you: string;
computer: string;
player: string;
mexican: string;
trainYours: string;
trainOf: string;
open: string;
closed: string;
tilesLeft: string;
boneyard: string;
round: string;
needs: string;
hub: string;
total: string;
pips: string;
layHere: string;
draw: string;
pass: string;
nextRound: string;
again: string;
yourTurn: string;
yourTurnCover: string;
yourTurnDraw: string;
yourTurnPass: string;
yourTurnChoose: string;
thinking: string;
roundOver: string;
outBy: string;
blocked: string;
gameOver: string;
laid: string;
drew: string;
passed: string;
dealt: string;
cliUsage: string;
cliUnknown: string;
cliNeeds: string;
cliTryHelp: string;
cliLangBad: string;
cliNoCommand: string;
cliCommandBad: string;
cliSetBad: string;
cliPlayersBad: string;
cliSeedBad: string;
cliValueBad: string;
cliNoSaved: string;
cliSavedBad: string;
cliFresh: string;
cliDeal: string;
cliSeat: string;
cliBoneyard: string;
cliPlayed: string;
cliWinner: string;
cliWinners: string;
cliSaved: string;
cliPhasePlaying: string;
cliPhaseRoundOver: string;
cliPhaseFinished: string;
};
Members
| Name | Type | Description |
|---|---|---|
set9 | string | The set's names, by its highest double. |
set12 | string | |
set15 | string | |
lengthFull | string | The house rules' names, each with the way it is chosen. |
lengthShort | string | |
doublesOne | string | |
doublesChain | string | |
mexicanAny | string | |
mexicanOwnFirst | string | |
you | string | A seat's default name. |
computer | string | |
player | string | |
mexican | string | The trains. |
trainYours | string | |
trainOf | string | |
open | string | |
closed | string | |
tilesLeft | string | |
boneyard | string | |
round | string | |
needs | string | |
hub | string | |
total | string | |
pips | string | |
layHere | string | What to press. |
draw | string | |
pass | string | |
nextRound | string | |
again | string | |
yourTurn | string | The status line: what is wanted of a person, or who is to play. |
yourTurnCover | string | |
yourTurnDraw | string | |
yourTurnPass | string | |
yourTurnChoose | string | |
thinking | string | |
roundOver | string | |
outBy | string | |
blocked | string | |
gameOver | string | |
laid | string | What just happened. |
drew | string | |
passed | string | |
dealt | string | |
cliUsage | string | The command line's help, whole. |
cliUnknown | string | |
cliNeeds | string | |
cliTryHelp | string | |
cliLangBad | string | |
cliNoCommand | string | |
cliCommandBad | string | |
cliSetBad | string | |
cliPlayersBad | string | |
cliSeedBad | string | |
cliValueBad | string | |
cliNoSaved | string | |
cliSavedBad | string | |
cliFresh | string | |
cliDeal | string | |
cliSeat | string | |
cliBoneyard | string | |
cliPlayed | string | |
cliWinner | string | |
cliWinners | string | |
cliSaved | string | |
cliPhasePlaying | string | |
cliPhaseRoundOver | string | |
cliPhaseFinished | string |
Examples
import type { DominoStrings } from "@johnmorrisdotca/domino";
import { DOMINO_STRINGS } from "@johnmorrisdotca/domino";
const value: DominoStrings = DOMINO_STRINGS.en;
console.log(value);{
set9: 'Double-nine',
set12: 'Double-twelve',
set15: 'Double-fifteen',
lengthFull: 'Every double',
lengthShort: 'Short',
doublesOne: 'Cover one',
doublesChain: 'Chain',
mexicanAny: 'Anyone, any time',
mexicanOwnFirst: 'After your own',
you: 'You',
computer: 'Computer {n}',
player: 'Player {n}',
mexican: 'Mexican Train',
trainYours: 'Your train',
trainOf: "{who}'s train",
open: 'open',
closed: 'closed',
tilesLeft: '{n} left',
boneyard: 'Boneyard: {n}',
round: 'Round {n} of {total}, hub double {engine}',
needs: 'Next: {n}',
hub: 'Hub',
total: 'Total',
pips: '{n} pips',
layHere: 'Lay here',
draw: 'Draw a tile',
pass: 'Pass',
nextRound: 'Next round',
again: 'Play again',
yourTurn: 'Your turn. Tap a tile to lay it.',
yourTurnCover: 'Your turn. Cover the double.',
yourTurnDraw: 'Nothing fits. Draw a tile.',
yourTurnPass: 'Nothing fits. Pass.',
yourTurnChoose: 'Choose a train for the tile.',
thinking: '{who} to play.',
roundOver: 'Round over. {why}',
outBy: '{who} played out.',
blocked: 'Nobody can play.',
gameOver: 'Game over. {who} won with {pips} pips.',
laid: '{who} laid {tile} on {train}.',
drew: '{who} drew a tile.',
passed: '{who} passed.',
dealt: 'Round {n} dealt: the hub double is {engine}.',
cliUsage: 'Usage: domino <command> [options]\n' +
'\n' +
'Dominoes and Mexican Train: the same deal for the same seed, on every machine.\n' +
'\n' +
' domino deal --seed 2026 --players 4 the deal a seed makes: every hand, and the hub double\n' +
' domino play --seed 2026 --players 4 a game played out by computers, with its scores\n' +
' domino play --seed 2026 --moves ...and every move, in words\n' +
' domino play --seed 2026 --save ...and the saved game, as text\n' +
' domino check "<saved game>" read a saved game back through the rules, and say where it stands\n' +
' domino replay "<saved game>" every move of a saved game, in words\n' +
'\n' +
'Options:\n' +
' --set <9|12|15> the set, by its highest double (12 unless said)\n' +
' --players <2..8> how many sit at the table (4 unless said)\n' +
' -s, --seed <n> a whole number (one is drawn, and named on standard error, unless given)\n' +
' --length <full|short> every round, or half of them (full unless said)\n' +
' --doubles <one|chain> cover each double at once, or chain doubles (one unless said)\n' +
' --mexican <any|own-first>\n' +
' the Mexican Train open to all, or only once you have laid on your own\n' +
' --moves play: print every move\n' +
' --save play: print the saved game on the last line\n' +
' --stdin check, replay: read the saved game from standard input\n' +
' -j, --json print JSON (format 1) for deal, play and check\n' +
" --lang <en|ja> English or Japanese (default: your system's)\n" +
' -h, --help this help\n' +
' -v, --version the version\n' +
'\n' +
'Exit codes: 0 done, 1 what was asked for could not be done (a saved game the\n' +
'rules refuse), 2 the command was wrong.\n',
cliUnknown: 'unknown option {part}',
cliNeeds: '{part} needs a value',
cliTryHelp: 'Try `domino --help`.',
cliLangBad: '--lang takes en or ja',
cliNoCommand: 'say what to do: deal, play, check or replay',
cliCommandBad: '“{part}” is not a command: deal, play, check or replay',
cliSetBad: '--set takes 9, 12 or 15',
cliPlayersBad: '--players takes a whole number from 2 to 8',
cliSeedBad: '--seed takes a whole number from 0 to 4294967295',
cliValueBad: '{part} takes one of: {choices}',
cliNoSaved: 'there is no saved game to read: give it after the command, or with --stdin',
cliSavedBad: 'that is not a game these rules can play out again',
cliFresh: 'seed {seed} (pass --seed {seed} to repeat this)',
cliDeal: '{set}, {players} players, seed {seed}',
cliSeat: '{who}: {tiles}',
cliBoneyard: 'Boneyard: {n} tiles',
cliPlayed: '{set}, {players} players, seed {seed}, {rounds} rounds; moves made: {moves}',
cliWinner: 'Winner: {who} with {pips} pips.',
cliWinners: 'Winners: {who}, each with {pips} pips.',
cliSaved: 'Saved game:',
cliPhasePlaying: 'Round {n} of {total} is being played; {who} is to play.',
cliPhaseRoundOver: 'Round {n} of {total} is over; the next is to be dealt.',
cliPhaseFinished: 'The game is over.'
}What it prints (run when this page was built)