From fc59ef77cda14d97d854dfcaa848307cfa512b69 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 23:13:24 +0100 Subject: v1.0.0: replace slots with 5x3 reels and five paylines --- docs/SLOTS.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/TESTING.md | 10 ++++---- 2 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 docs/SLOTS.md (limited to 'docs') diff --git a/docs/SLOTS.md b/docs/SLOTS.md new file mode 100644 index 0000000..ccc3b60 --- /dev/null +++ b/docs/SLOTS.md @@ -0,0 +1,74 @@ +# Slots: 5 reels x 3 rows + +## Grid + +- 5 reels (columns) x 3 rows = 15 visible symbols. +- Six symbols, uniform: `C` cherry, `L` lemon, `O` orange, `G` grapes, + `D` diamond, `S` seven. +- The bet is the **total** bet, not a per-line bet. +- Five paylines: top, middle, bottom, V, inverted V. +- A line pays for 3, 4 or 5 matching symbols starting on reel 1 and reading + left to right. + +``` +line 1: top row across all five reels +line 2: middle row across all five reels +line 3: bottom row across all five reels +line 4: top, middle, bottom, middle, top +line 5: bottom, middle, top, middle, bottom +``` + +## Paytable + +Multipliers are applied to the total bet. + +| Symbol | 3 of a kind | 4 of a kind | 5 of a kind | +| --- | ---: | ---: | ---: | +| C | 2x | 5x | 15x | +| L | 3x | 7x | 20x | +| O | 3x | 8x | 25x | +| G | 4x | 12x | 40x | +| D | 6x | 18x | 70x | +| S | 9x | 30x | 150x | + +- Exact RTP: **425/432 = 0.983796...** (1.62% house edge). +- Maximum win: 5 lines x 150x = **750x total bet**. +- Chance of any win on a spin: about **13%**. +- The RTP is checked by `SlotsGame::theoretical_rtp()` and `tests/slots.rs`. + +## Wire format + +`GAME_RESULT` keeps its existing fields and appends the winning lines: + +``` +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. +- Older servers may still send a 3-character `reels` string; the client + degrades it to the first row. + +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`. + +## Client board + +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 ] + +Won 20 PLN +Winning lines: 1, 3 +[+/-] 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. diff --git a/docs/TESTING.md b/docs/TESTING.md index 55f5422..8fac851 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -36,10 +36,12 @@ Use an 80-column terminal because several output lines are width-sensitive. prompt, Ctrl+C exits and restores the terminal. 4. `help` fits 80 columns. Tab completion wraps within 76 columns and the cursor stays visible. -5. `play slots 50` shows `Bet: 50 PLN` and the fetched balance. -6. Space shows `Spinning...`, then the reels, win text, and new balance inside - the same 7-line board. The controls line is never overwritten. -7. `+` / `-` after a spin changes only the bet; no stale result lines appear. +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`. +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. 9. `info`, `ping`, `send hello`, and `hosts` print readable output; the host fingerprint fits 80 columns. -- cgit v1.2.3