summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/SLOTS.md26
-rw-r--r--docs/TESTING.md5
2 files changed, 20 insertions, 11 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.
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.
38 cursor stays visible. 38 cursor stays visible.
395. `play slots 50` shows a 5x3 grid, `Lines: 5`, and the fetched balance. 395. `play slots 50` shows a 5x3 grid, `Lines: 5`, and the fetched balance.
406. Space shows `Spinning...`, then the 3 rows, win text, winning-line list, and 406. Space shows `Spinning...`, then the 3 rows, win text, winning-line list, and
41 new balance inside the same 9-line board. The controls line is never 41 new balance inside the same 9-line board. Winning symbols appear as
42 overwritten. Slots rules and RTP: `docs/SLOTS.md`. 42 yellow/bold `{ X }` cells; the `Winning lines:` list matches. The controls
43 line is never overwritten. Slots rules and RTP: `docs/SLOTS.md`.
437. `+` / `-` after a spin changes only the bet; no stale grid or result lines 447. `+` / `-` after a spin changes only the bet; no stale grid or result lines
44 appear. 45 appear.
458. `q` clears the board. Ctrl+C in a game clears the board and exits. 468. `q` clears the board. Ctrl+C in a game clears the board and exits.