diff options
Diffstat (limited to '')
| -rw-r--r-- | docs/SLOTS.md | 26 | ||||
| -rw-r--r-- | docs/TESTING.md | 5 |
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 | ``` |
| 44 | GAME_RESULT <session> <winnings> <bet> <balance> <reels> <win_type> <win_lines> | 44 | GAME_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 | ||
| 54 | The extra `win_lines` field is additive, but the 5x3 `reels` payload is a | 58 | The extra `win_lines`/`win_cells` fields are additive. The 5x3 `reels` payload |
| 55 | breaking change for pre-5x3 clients. That is why the release is `1.0.0`. | 59 | is a breaking change for pre-5x3 clients, hence `1.0.0`; highlighting is the |
| 60 | backward-compatible `1.1.0` release. The client never re-derives paylines: the | ||
| 61 | server 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 === |
| 63 | Bet: 10 PLN Lines: 5 Balance: 1000 PLN | 69 | Bet: 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 | ||
| 68 | Won 20 PLN | 74 | Won 20 PLN |
| 69 | Winning lines: 1, 3 | 75 | Winning 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 | 79 | Winning cells use braces and are rendered yellow/bold in the terminal. The |
| 74 | pass can highlight the winning rows without recomputing the payout. | 80 | line list below the status names the paylines that won. Both come from the |
| 81 | server's `win_lines` and `win_cells`, which are already carried through the | ||
| 82 | 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. | |||
| 38 | cursor stays visible. | 38 | cursor stays visible. |
| 39 | 5. `play slots 50` shows a 5x3 grid, `Lines: 5`, and the fetched balance. | 39 | 5. `play slots 50` shows a 5x3 grid, `Lines: 5`, and the fetched balance. |
| 40 | 6. Space shows `Spinning...`, then the 3 rows, win text, winning-line list, and | 40 | 6. 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`. | ||
| 43 | 7. `+` / `-` after a spin changes only the bet; no stale grid or result lines | 44 | 7. `+` / `-` after a spin changes only the bet; no stale grid or result lines |
| 44 | appear. | 45 | appear. |
| 45 | 8. `q` clears the board. Ctrl+C in a game clears the board and exits. | 46 | 8. `q` clears the board. Ctrl+C in a game clears the board and exits. |
