ParlorNet
Turn-based game server for any computer, old or new
Clients | Protocols | Browsers | Telnet programs | Docs | Source

mancala/1 (draft)

Two players. Single-step moves (no staged). Seat 0 moves first. A board of two rows of six pits, one row per seat, and a store for each seat. Seeds are sown anticlockwise: along the mover's own row from its pit 1 to its pit 6, then (where the rules allow it) into the mover's store, then along the opponent's row from its pit 1 to its pit 6, then the opponent's store, and round again.

Rulesets:

Options: seeds= (kalah only, 3 to 6, default 4); rules=kalah|oware (see Choosing the ruleset); turn= and vis= are the server's.

Choosing the ruleset

The ruleset is the word after the type on NEW (NEW mancala oware). The plugin reads it from the rules field of the plugin's new request. The option rules= is only for a core that does not pass that field (draft 0 of docs/plugins.md had none): such a core starts every table with kalah unless the table has rules=oware. When the core passes the ruleset, as this one does, the ruleset wins and the option is ignored. The view's RU line always says which ruleset the table plays.

Static geometry (flag G)

BRD 6: pits per row.

View lines

LineMeaning
RU rules seedsThe ruleset (kalah or oware) and the seeds each pit started with.
B c1 ... c14The board, 14 counts in sowing order: seat 0's pits 1-6, seat 0's store, seat 1's pits 1-6, seat 1's store. In oware a store holds that seat's captures.
LM seat pitThe last move: the seat and the pit it played. Absent before the first move.
W seatWhose turn it is; W -1 once the game is over.
T seat pointsScores (common line; not sent, the stores are the score).

Pit p of seat s is the count at position s * 7 + p of B (counting from 1); the pit opposite seat 0's pit p is seat 1's pit 7 - p. A frontend draws the viewer's row along the bottom, pit 1 on the left, their store on the right, and the opponent's row along the top read right to left.

Move tokens

A pit number, 1 to 6, counted along the mover's own row from the mover's left (the pit after the opponent's store). M lists the legal pits on the mover's turn: every non-empty pit, except under the oware must-feed rule. There are no passes: in kalah the game ends as soon as a row is empty, and in oware a player with no legal move ends the game. CHK table pit answers OK captures n, the seeds the move would capture.

Events

A typical move: SOW 0 3 4 4 4 0 5 5 5 1 4 4 4 4 4 4 0, AGAIN 0, TURN 0.

Size

Full view about 60 bytes (RU, a B line of at most 45 bytes, LM, W, CLK). SOW is at most about 55 bytes (14 counts: 48 seeds by default, 72 with seeds=6, so few counts have two digits), so an EVT line stays under 80 bytes. Other events under 20 bytes.

Period clients

Awale (Myriad, Mac and Windows, 1997-2001) plays only the Oware family of rules, over IRC (docs/research/clients-mancala.md); oware is the ruleset a bridge for it would use. Its moves name a hole number, which maps onto the pit numbers here.

This doc on GitHub


 These pages cover every ParlorNet server. | Source code | ParlorNet is free software.