summaryrefslogtreecommitdiffstats
path: root/docs/SLOTS.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-28 23:19:52 +0100
committersalmonik <salmonik@tuta.io>2026-10-28 23:19:52 +0100
commit2915d826f744612e0d975282f5bddf13270b9f3f (patch)
treea2864bfaef91070ac3b4e13b8b731e539a757cc8 /docs/SLOTS.md
parentv1.0.0: replace slots with 5x3 reels and five paylines (diff)
downloadzagan-bet-2915d826f744612e0d975282f5bddf13270b9f3f.tar.gz
zagan-bet-2915d826f744612e0d975282f5bddf13270b9f3f.zip
v1.1.0: highlight winning symbols on the slots board
Diffstat (limited to '')
-rw-r--r--docs/SLOTS.md26
1 files changed, 17 insertions, 9 deletions
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.
38 38
39## Wire format 39## Wire format
40 40
41`GAME_RESULT` keeps its existing fields and appends the winning lines: 41`GAME_RESULT` keeps its existing fields and appends the winning lines and cells:
42 42
43``` 43```
44GAME_RESULT <session> <winnings> <bet> <balance> <reels> <win_type> <win_lines> 44GAME_RESULT <session> <winnings> <bet> <balance> <reels> <win_type> <win_lines> <win_cells>
45``` 45```
46 46
47- `reels`: 15 characters, **column-major**: reel 0 top/middle/bottom, then 47- `reels`: 15 characters, **column-major**: reel 0 top/middle/bottom, then
48 reel 1, and so on. 48 reel 1, and so on.
49- `win_type`: `none`, `win`, `big` (>= 10x total bet) or `mega` (>= 50x). 49- `win_type`: `none`, `win`, `big` (>= 10x total bet) or `mega` (>= 50x).
50- `win_lines`: 1-based comma-separated line numbers, or `-` for no win. 50- `win_lines`: 1-based comma-separated line numbers, or `-` for no win.
51- `win_cells`: 0-based column-major cell indices to highlight, or `-` for no
52 win. Example: `0,3,6` is the first three cells of the top row.
51- Older servers may still send a 3-character `reels` string; the client 53- Older servers may still send a 3-character `reels` string; the client
52 degrades it to the first row. 54 degrades it to the first row.
55- Older 1.0 servers send only `win_lines`; the 1.1 client simply shows no
56 highlights against them.
53 57
54The extra `win_lines` field is additive, but the 5x3 `reels` payload is a 58The extra `win_lines`/`win_cells` fields are additive. The 5x3 `reels` payload
55breaking change for pre-5x3 clients. That is why the release is `1.0.0`. 59is a breaking change for pre-5x3 clients, hence `1.0.0`; highlighting is the
60backward-compatible `1.1.0` release. The client never re-derives paylines: the
61server sends exactly which cells won.
56 62
57## Client board 63## Client board
58 64
@@ -62,13 +68,15 @@ The board is nine lines:
62=== SLOTS === 68=== SLOTS ===
63Bet: 10 PLN Lines: 5 Balance: 1000 PLN 69Bet: 10 PLN Lines: 5 Balance: 1000 PLN
64[ C ] [ L ] [ O ] [ G ] [ D ] 70[ C ] [ L ] [ O ] [ G ] [ D ]
65[ S ] [ C ] [ L ] [ O ] [ G ] 71[ S ] { C } { C } [ O ] [ G ]
66[ D ] [ S ] [ C ] [ L ] [ O ] 72[ D ] [ S ] { C } [ L ] [ O ]
67 73
68Won 20 PLN 74Won 20 PLN
69Winning lines: 1, 3 75Winning lines: 2
70[+/-] Bet [SPACE] Spin [Q] Quit 76[+/-] Bet [SPACE] Spin [Q] Quit
71``` 77```
72 78
73`win_lines` is already carried through the client state so the next animation 79Winning cells use braces and are rendered yellow/bold in the terminal. The
74pass can highlight the winning rows without recomputing the payout. 80line list below the status names the paylines that won. Both come from the
81server's `win_lines` and `win_cells`, which are already carried through the
82client state for the animation pass.