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

gridwords/1

Grid Words: a crossword-building tile game for 2-4 players, each with a hidden rack. Flags: nomoves (there is no legal-move list; a client builds a play and may preview it with CHK). Single-step moves (no staged). Rulesets: english and classic. Options: none of the game's own; the table's seat count is the core's players=2|3|4 on NEW (default 2), and the time per turn is the core's turn=.

Rules (english)

Rules (classic)

The same board, tiles, scoring and word list as english, with the ending used in club and tournament play: six turns in a row without a word played (passes and exchanges, by any players) end the game, however many players there are. Everything else, including the rack penalties at the end, is as in english. The DOoM extension (docs/protocols.md) makes its tables with this ruleset, because the crossword-game servers of the 1990s ended games this way. The plugin keeps each ruleset's differences in one table (RULESETS in plugins/gridwords/plugin.py), so a later ruleset for another period program can be added there.

The word list

The plugin reads a text file, one word per line (2-15 letters A-Z, any case; other lines are skipped), named by the operator's environment setting GRIDWORDS_WORDS, else plugins/gridwords/words.txt. It is read once and again when the file changes. Without one, NEW fails with ERR BADOPT this server has no word list for Grid Words yet. The list and its licence are the operator's choice; the type contract does not depend on which. (This is the one file the plugin reads.)

The server ships ENABLE 1.0 (1997, public domain) as plugins/gridwords/words.txt: 172,823 words, of which the plugin takes the 168,551 of 2-15 letters. plugins/gridwords/SOURCES.md records where it comes from and its checksums.

Squares

Squares are 1-based: x across from the left, y down from the top, so the centre is 8 8. Frontends show columns as letters a to o and rows as numbers, so 8 8 is h8 on the screen.

Static geometry (flag G)

LineMeaning
BRD w hBoard size: BRD 15 15.
CTR x yThe square the first word covers: CTR 8 8.
PRM kind x y x y ...Premium squares by kind: TW DW (triple and double word), TL DL (triple and double letter). Up to 10 squares a line; several lines per kind. The centre is also listed as DW.
TIL letter points countOne line per letter, _ for the blank: TIL Q 10 1, TIL _ 0 2.

About 680 bytes, sent once and cached by the client.

View lines

LineMeaning
X x y c x y c ...Tiles on the board as triples, up to 9 a line, as many lines as needed (none on an empty board). c upper case is a tile; lower case is a blank standing for that letter.
R lettersYour rack, _ for a blank; R - when it is empty. Only to a seated player, and only their own.
K seat nTiles on each seat's rack, one line per seat.
BAG nTiles left in the bag.
T seat pointsScores, one line per seat (common line).
W seatWhose turn it is; W -1 once the game is over.
`LAST seat x y H\V word points`The last word played (as on the board, blanks in lower case), when there is one.

S (with flag T): Your move, Waiting for another player, Seat n to move (watchers) or Game over: result (as in END). With 60 tiles on the board a full view is about 600 bytes; with all 225 squares filled, about 1.9 KB. Every line is at most 78 bytes.

Move tokens

Letters, the verb and the direction are case-insensitive.

M is not provided (flag nomoves). CHK table PLAY ... answers OK points word word ... (the words as they would stand, blanks in lower case; cut to fit the line) or ERR ILLEGAL reason, the same reason MOV would give, including words not in the list. CHK works when it is not your turn too, so a player can plan while waiting. CHK table EXCH ... and CHK table PASS answer OK 0 when they would be accepted.

Events

EventMeaning
`PLAY seat x y H\V word points`A word played: the main word as it stands on the board, and the points scored for the whole play.
X x y c ...The new tiles of that play, as triples (the event after PLAY).
DRAW seat nThe player drew n tiles; which ones only that player sees, in the next VUE.
EXCH seat nThe player exchanged n tiles.
PASS seatThe player passed.
TURN seatWhose turn it is now.
ADJ seat ?n lettersAt the end: the change to each seat's score and the tiles left on its rack (- for none: the player who went out, who gains the others' total).
END win seat s0/s1/... or END draw s0/s1/...The final scores, after the ADJ changes.

Size

A play is four events of about 25, 40, 10 and 6 bytes (PLAY, X, DRAW, TURN), at most 80 bytes each with the EVT prefix. Static geometry about 680 bytes (once). Full view about 600 bytes mid-game.

Frontends

Open

This doc on GitHub


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