createTileSoundsfunction
A table's tile sounds.
Every export of every entry point, each with its own page. This page keeps the addresses the old one-page reference had.
@johnmorrisdotca/domino/tile-soundscreateTileSoundsfunctionA table's tile sounds.
MOST_SOUNDS_AT_ONCEconstantAs many sounds as one call plays: fifteen tiles drawn are eight clicks, not a wall of noise.
PlayTileSoundOptionstypeHow one sound is played.
soundTimesfunctionWhen each of count sounds starts, in milliseconds from the first: one every gap, and no more than MOST_SOUNDS_AT_ONCE, spread over the same time.
TILE_SOUND_KINDSconstantEvery kind of sound, in the order a game meets them.
TileSoundDatatypeThe recordings, by name (lay-2), as base64 AAC.
TileSoundKindtypeOne kind of sound: shuffle the tiles stirred face down, draw a tile taken from the boneyard, lay a tile set down on a train, knock a rap on the table, which is how a pass is announced.
TileSoundstypeA table's sounds: play one, mute and unmute, change the volume, close when the table goes.
TileSoundsOptionstypeHow a table's sounds are made.
TileSoundWindowtypeThe parts of a window the sounds use: an audio context and atob.
@johnmorrisdotca/domino/soundsTILE_SOUND_DATAconstantThe tile sounds, recorded: tiles shuffled, drawn, laid and knocked on the table, as base64 AAC (.m4a).
TileSoundFiletypeThe name of one recording: its kind of sound and a number, such as lay-2.
@johnmorrisdotca/dominocleanTrainNamefunctionA seat's name as given, its spaces tidied and cut to TRAIN_NAME_MOST characters.
CLI_MOVES_MOSTconstantThe most moves a played game may take before the command line gives up, far above any game the rules allow.
cliLanguagefunctionThe language the command line speaks: --lang, or the environment's, or the system's; Japanese for ja…, English for anything else.
CliResulttypeWhat the command line came to.
CliSurroundingstypeWhat the command line is run in.
computerMovefunctionThe move the computer in the seat to move makes now: the best-scored lay, or the draw, pass or next round it must take.
decodeTrainfunctionA kept game read back, or null for nothing kept or anything these rules cannot play out again.
DominotypeA domino in a hand or the boneyard: low * 16 + high.
DOMINO_STRINGSconstantEvery string, in both languages.
dominoLanguagefunctionThe language a person asked for, by en or ja or a tag that begins with one: English for anything else.
dominoSayfunctionA string with its braces filled in from values; a brace with no value is left as it is.
DominoStringstypeThe names of the strings.
DoublesRuletypeHow a double is dealt with, the table's one house rule about them.
encodeTrainfunctionSerialize setup and recorded legal moves so the same seeded game can be replayed.
endsOffunctionA tile's two ends, the smaller first.
everyTilefunctionEvery tile of a set, double-blank to its highest double, in order.
fitsfunctionWhether a tile has this number at either end, so it can be laid against it.
handPipsfunctionThe pips in a hand, which count against its holder when the round ends.
handSizeForfunctionHOW MANY TILES EACH PLAYER IS DEALT, by the set and the number at the table.
isDoublefunctionBoth ends the same: a double, which is laid across a train and must be covered.
laidAgainstfunctionThe tile laid against end: turned so that end touches, the other one left open.
LaidDominotypeA domino laid in a train, turned so its from end touches the train: from * 16 + to.
laidEndsfunctionA laid tile's two ends in the order it lies: the one touching the train, then the open one.
LanguagetypeThe languages Domino speaks.
legalPlaysfunctionEvery tile the player to move may lay, and where: what moves offers, and what the table lights up.
longestRunfunctionThe longest run of tiles from hand that can be laid one after another against end, in the order they would be laid.
mayLayfunctionWhether the player to move may lay this tile on this train now: the same answer legalPlays gives, for one tile, without listing every other.
mexicanOffunctionThe Mexican Train's number among a game's trains: after every seat's own.
MexicanStarttypeWhen the Mexican Train may be started.
moveCountfunctionHow many moves a game has made.
movesOffunctionEvery move a game has made, first to last.
openEndfunctionThe number a train's next tile must match: its last tile's open end, or the engine double's when nothing is laid on it yet.
peopleAtfunctionThe seats a person plays: a table with two or more of them passes the device, and covers each hand between turns.
pipsOffunctionEvery pip on a tile: what it counts against its holder when a round ends.
playTrainfunctionThe game after that move, or null for a move that may not be made now.
RandomtypeA number in [0, 1), like Math.random, from a stream a seed fixes.
replayTrainfunctionA game played again from its table and its moves: what reading a kept game back does.
RoundEndingtypeWhy a round ended: somebody played their last tile, or nobody could play and nothing was left to draw.
RoundResulttypeA round's result, kept for the table of scores.
roundsForfunctionHow many rounds a game of this length plays with this set: one per double, top to blank, or the first half of them.
runClifunctionRun the command line.
seededRandomfunctionA stream of numbers in [0, 1) fixed by a seed.
shuffledfunctionA copy of the list in a random order (Fisher–Yates); the list given is left alone.
startTrainfunctionA new game: the set (its highest double), the names at the table (one a seat), which seats a computer plays, the options, and the seed every shuffle is drawn from.
tileOffunctionThe tile with these two ends, whichever order they are given in.
tileOfLaidfunctionThe tile a laid tile is, whichever way round it lies.
tileWordsfunctionA tile as a person reads it: "6–4", the larger end first, as a tile is named at the table.
TraintypeA train on the table: the tiles laid on it in order, and whether its owner's marker says anybody may play on it.
TRAIN_DEFAULT_OPTIONSconstantThe options a table opens on: every round, one double at a time, and the Mexican Train open from the start.
TRAIN_DOUBLESconstantThe one-double and chained-double house-rule choices.
TRAIN_LENGTHSconstantThe full and short round-count choices for a game.
TRAIN_MEXICANconstantThe unrestricted and own-train-first Mexican Train opening choices.
TRAIN_NAME_MOSTconstantThe longest name a seat keeps.
TRAIN_PHASESconstantMEXICAN TRAIN, THE DOMINO GAME: the rules, and nothing else.
TRAIN_PIP_BASEconstantThe largest set's highest double, and so the base a tile's two ends are written in (tileOf).
TRAIN_SET_NAMESconstantEach set by name, for the set-up's tiles and the card on My games.
TRAIN_SETSconstantTHE SETS OFFERED, by their highest double.
trainAgainfunctionThe same table again, the same seats and options, with a fresh shuffle.
TrainGametypeA game, as its table and moves make it.
TrainHistorytypeOne link of a game's record: a move, and every move before it.
TrainLengthtypeHow many rounds: all of them, one for every double from the set's highest down to double blank, or half as many.
TrainMovetypeOne move at the table.
trainMovesfunctionEvery move the player to move may make now; none once the game is over.
trainNamefunctionA train's name: "Your train", "Computer 2's train", or the Mexican Train.
trainNewsfunctionWhat the last move did, in a line, or "" before there is one: "Computer 2 laid 9–4 on Your train."
TrainOptionstypeWhat the set-up chose, beyond the set and the players.
TrainPhasetypeWhether the game is playing, awaiting the next round, or finished.
trainPlayerNamefunctionA seat's name as the table reads it: the one given, or "Computer 3" for a computer's seat left blank, "Player 3" for a person's.
TrainSeattypeWho sits where: 0 is the first player, round the table in the order the set-up named them.
trainSeatNamefunctionA seat's name: the one given at the table, or "You" for the person at this device, or "Computer 3" or "Player 3" for the seat's number.
trainSetLabelfunctionThe set's name by its highest double ("Double-twelve"), or null for a number that is no set offered.
trainSetNamefunctionThe set's name, or null for a number that is no set offered.
trainStatusfunctionWhat is going on, in a line: who is to play, or what the person at you is asked to do (lay, cover a double, draw, pass), or how the round or the game ended.
trainTotalsfunctionEach seat's total over every round played: the lowest wins.
VERSIONconstantThe package's version.