Race Games

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.

How a family uses it

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]]

Routes

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.

KeyMeaning
routesNamed routes, each a list of cells
seatRoutesThe 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)
piecesPieces on each route a seat walks
startThe cells each seat starts on; the rest wait in reserve

The throw

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 }
KeyMeaning
lots, scoresTwo-sided lots; the number showing their marked side, looked up in scores
dice, splitDice with any faces; split shares them among pieces in any grouping
again, bankScores that throw again, after moving or (with bank) at once

Moving and landing

KeyMeaning
enterWith, enterAtWhich throws bring a piece in, and whether it lands on the first cell or moves the throw's length
bearOff, bearOffFromExact or overshooting bear-off; the only cells a piece may leave from
contactcapture (back to reserve) or swap
safe, rethrowCells that cannot be landed on by an opponent; cells that give another throw
captureRethrowA capture gives another throw
pairsSafe, blockadeTwo side by side cannot be landed on; this many in a row cannot be passed
mustStop, sendBackCells a piece must land on before passing; a cell that sends a piece back
stack, immunityshare or together; with size, only a group as large may take a group
whenBlockedbackward: with no move forward, step back to the nearest empty cell
teams, teamOrder, captureToFinishPartners who win together, the order they finish in, and a capture required first
mayDeclineA player may refuse to move after throwing

Games

Royal Game of Ur, Senet, Nyout, Pachisi and Chaupar.