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 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'docs/SLOTS.md') 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. -- cgit v1.2.3