# 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 and cells: ``` 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`/`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 The board is ten lines: ``` === SLOTS === Bet: 10 PLN Balance: 1000 PLN [ C ] [ L ] [ O ] [ G ] [ D ] [ S ] { C } { C } [ O ] [ G ] [ D ] [ S ] { C } [ L ] [ O ] Pays 3/4/5 x bet: C 2/5/15 L 3/7/20 O 3/8/25 G 4/12/40 D 6/18/70 S 9/30/150 Won 20 PLN Winning lines: 2 [+/-] Bet [SPACE] Spin [Q] Quit ``` The two lines above the status are the compact paytable: for each symbol, the multipliers of the total bet for 3, 4 and 5 of a kind. It is split so it does not wrap on a narrow terminal. 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.