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

reversi/1 (draft)

Two players. Single-step moves (no staged). Rulesets: standard (8x8, four discs in the centre diagonal, seat 0 moves first, forced pass when there is no legal move, ends when neither can move or the board is full, more discs wins). Options: size= (even, 4-10, default 8). The time per turn is the server's turn= (protocol.md).

Colors are not part of the contract: seat 0 and seat 1, with a frontend free to show them as black/white, dark/light, or anything else.

Static geometry (flag G)

BRD w h, square boards for now.

View lines

LineMeaning
R y cellsOne line per row, y = 1..h from the top. cells is w characters: . empty, 0 or 1 the seat owning the disc.
C n0 n1Disc counts per seat.
W seatWhose turn it is; W -1 once the game is over.

The rows are a type-defined dense encoding, not a generic grid: Reversi boards fill up, so rows (about 100 bytes for 8x8) beat a coordinate list (up to about 260).

Move tokens

Squares are a column letter and a row number, d3 (columns a-h, rows 1-8 on the standard board, rows counted from the top). M lists the legal squares. There is no PASS token: when a player has no legal square the server passes for them and sends PASS. CHK table sq answers OK flips n, the discs the move would flip.

Events

Size

Full view about 110 bytes. Typical event 10-40 bytes.

First-case test plan

Reversi is the first implementation: the simplest game that exercises the server, a plugin, the typed view, events, CHK-free move lists, the telnet adapter, a custom client, and the IOS adapter.

This doc on GitHub


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