One plugin plays the Royal Game of Ur, Senet, Nyout, Pachisi and Chaupar. A game throws something, moves a piece along a route, and something happens where it lands. Every part of that is declared in the game's rulebook.
The race plugin is not a family of its own. A rulebook names it, and its keys go under the family's own plugin block:
engine:
topology: { type: grid, rows: 3, cols: 8 }
plugin: race
plugins:
royal-ur:
pieces: 7
routes:
white: [[2,3],[2,2],[2,1],[2,0],[1,0],[1,1], ...]
seatRoutes: [white, black]
throw: { lots: 4 }
safe: [[0,0],[2,0],[1,3],[0,6],[2,6]]
rethrow: [[0,0],[2,0],[1,3],[0,6],[2,6]]
A route is an ordered list of the board's own cells: [row, col] on a grid, a node id on a graph. It is not a topology; the board stays whatever the game draws. A cell may appear on a route twice, so a piece remembers how far along it is, not only where it stands.
| Key | Meaning |
|---|---|
routes | Named routes, each a list of cells |
seatRoutes | The route each seat walks, or a list of routes for a seat that runs more than one |
shortcuts | [{{ at, take }}]: a piece that starts its move on at may walk route take instead (Nyout) |
pieces | Pieces on each route a seat walks |
start | The cells each seat starts on; the rest wait in reserve |
The randomiser is declared, never assumed to be a d6. See conventions.md for the full convention.
throw: { lots: 6, scores: { 0: 25, 1: 10 }, again: [25, 10, 6] }
throw: { dice: [[1,2,5,6], [1,2,5,6], [1,2,5,6]], split: true }
| Key | Meaning |
|---|---|
lots, scores | Two-sided lots; the number showing their marked side, looked up in scores |
dice, split | Dice with any faces; split shares them among pieces in any grouping |
again, bank | Scores that throw again, after moving or (with bank) at once |
| Key | Meaning |
|---|---|
enterWith, enterAt | Which throws bring a piece in, and whether it lands on the first cell or moves the throw's length |
bearOff, bearOffFrom | Exact or overshooting bear-off; the only cells a piece may leave from |
contact | capture (back to reserve) or swap |
safe, rethrow | Cells that cannot be landed on by an opponent; cells that give another throw |
captureRethrow | A capture gives another throw |
pairsSafe, blockade | Two side by side cannot be landed on; this many in a row cannot be passed |
mustStop, sendBack | Cells a piece must land on before passing; a cell that sends a piece back |
stack, immunity | share or together; with size, only a group as large may take a group |
whenBlocked | backward: with no move forward, step back to the nearest empty cell |
teams, teamOrder, captureToFinish | Partners who win together, the order they finish in, and a capture required first |
mayDecline | A player may refuse to move after throwing |
Royal Game of Ur, Senet, Nyout, Pachisi and Chaupar.