From 2915d826f744612e0d975282f5bddf13270b9f3f Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 23:19:52 +0100 Subject: v1.1.0: highlight winning symbols on the slots board --- docs/SLOTS.md | 26 +++++++++++++++++--------- docs/TESTING.md | 5 +++-- 2 files changed, 20 insertions(+), 11 deletions(-) (limited to 'docs') diff --git a/docs/SLOTS.md b/docs/SLOTS.md index ccc3b60..a64bdbf 100644 --- a/docs/SLOTS.md +++ b/docs/SLOTS.md @@ -38,21 +38,27 @@ Multipliers are applied to the total bet. ## Wire format -`GAME_RESULT` keeps its existing fields and appends the winning lines: +`GAME_RESULT` keeps its existing fields and appends the winning lines and cells: ``` -GAME_RESULT +GAME_RESULT ``` - `reels`: 15 characters, **column-major**: reel 0 top/middle/bottom, then reel 1, and so on. - `win_type`: `none`, `win`, `big` (>= 10x total bet) or `mega` (>= 50x). - `win_lines`: 1-based comma-separated line numbers, or `-` for no win. +- `win_cells`: 0-based column-major cell indices to highlight, or `-` for no + win. Example: `0,3,6` is the first three cells of the top row. - Older servers may still send a 3-character `reels` string; the client degrades it to the first row. +- Older 1.0 servers send only `win_lines`; the 1.1 client simply shows no + highlights against them. -The extra `win_lines` field is additive, but the 5x3 `reels` payload is a -breaking change for pre-5x3 clients. That is why the release is `1.0.0`. +The extra `win_lines`/`win_cells` fields are additive. The 5x3 `reels` payload +is a breaking change for pre-5x3 clients, hence `1.0.0`; highlighting is the +backward-compatible `1.1.0` release. The client never re-derives paylines: the +server sends exactly which cells won. ## Client board @@ -62,13 +68,15 @@ The board is nine lines: === SLOTS === Bet: 10 PLN Lines: 5 Balance: 1000 PLN [ C ] [ L ] [ O ] [ G ] [ D ] -[ S ] [ C ] [ L ] [ O ] [ G ] -[ D ] [ S ] [ C ] [ L ] [ O ] +[ S ] { C } { C } [ O ] [ G ] +[ D ] [ S ] { C } [ L ] [ O ] Won 20 PLN -Winning lines: 1, 3 +Winning lines: 2 [+/-] Bet [SPACE] Spin [Q] Quit ``` -`win_lines` is already carried through the client state so the next animation -pass can highlight the winning rows without recomputing the payout. +Winning cells use braces and are rendered yellow/bold in the terminal. The +line list below the status names the paylines that won. Both come from the +server's `win_lines` and `win_cells`, which are already carried through the +client state for the animation pass. diff --git a/docs/TESTING.md b/docs/TESTING.md index 8fac851..8e35c5a 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -38,8 +38,9 @@ Use an 80-column terminal because several output lines are width-sensitive. cursor stays visible. 5. `play slots 50` shows a 5x3 grid, `Lines: 5`, and the fetched balance. 6. Space shows `Spinning...`, then the 3 rows, win text, winning-line list, and - new balance inside the same 9-line board. The controls line is never - overwritten. Slots rules and RTP: `docs/SLOTS.md`. + new balance inside the same 9-line board. Winning symbols appear as + yellow/bold `{ X }` cells; the `Winning lines:` list matches. The controls + line is never overwritten. Slots rules and RTP: `docs/SLOTS.md`. 7. `+` / `-` after a spin changes only the bet; no stale grid or result lines appear. 8. `q` clears the board. Ctrl+C in a game clears the board and exits. -- cgit v1.2.3