summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-01 16:17:19 +0100
committersalmonik <salmonik@tuta.io>2026-11-01 16:17:19 +0100
commitf07221b4e1d8aa464a44fe566884ccc0565406e9 (patch)
tree48020a68cee1c95521d594dc6803c1f7ec01c801 /docs
parentadd nginx + php-fpm deployment example (diff)
downloadzagan-bet-f07221b4e1d8aa464a44fe566884ccc0565406e9.tar.gz
zagan-bet-f07221b4e1d8aa464a44fe566884ccc0565406e9.zip
v3.2.0: straight and split bets anywhere on the felt; add history command
Diffstat (limited to 'docs')
-rw-r--r--docs/GAMES.md19
-rw-r--r--docs/TESTING.md17
2 files changed, 30 insertions, 6 deletions
diff --git a/docs/GAMES.md b/docs/GAMES.md
index 8cc668f..bd372b1 100644
--- a/docs/GAMES.md
+++ b/docs/GAMES.md
@@ -80,9 +80,11 @@ Q forfeit an active hand (bet is lost), or leave when no hand is active
80 80
81- European wheel: 0-36, one green zero. 81- European wheel: 0-36, one green zero.
82- The felt is drawn in full and bet with a cursor. Over the numbers the cursor 82- The felt is drawn in full and bet with a cursor. Over the numbers the cursor
83 sits on a *lattice point*, the way a chip sits between numbers on a real 83 walks a grid twice as fine as the felt: on a cell it is a straight, on the
84 felt: an inner point covers four numbers (corner), an edge point covers two 84 line between two cells it is a split, and on a crossing it is a corner. Every
85 (split), and an outer corner is a straight. 85 number and every pair of adjacent numbers is reachable, as on a real felt.
86- The status line names the current bet and its odds, for example
87 `Bet: 16/17 ยท pays 18x`.
86- Bet types and returns (per unit staked, stake included): 88- Bet types and returns (per unit staked, stake included):
87 89
88 | Bet | Covers | Return | 90 | Bet | Covers | Return |
@@ -202,6 +204,17 @@ ROULETTE_RESULT <session> <winnings> <bet> <balance> <number> <color> <bets-json
202`black`). The server rejects unknown, out-of-range or duplicate-number 204`black`). The server rejects unknown, out-of-range or duplicate-number
203targets, and requires the total to equal the sum of the chips. 205targets, and requires the total to equal the sum of the chips.
204 206
207The client can read back its settled plays:
208
209```
210HISTORY [count]
211HISTORY <json-array>
212```
213
214`count` defaults to 20 and is capped at 50. Each record carries `game`, `bet`,
215`winnings`, `balance_after`, `at` (UTC) and the game's own `details` object,
216newest first. `HISTORY` without a session returns `ERROR Not logged in`.
217
205Blackjack is a multi-step session: 218Blackjack is a multi-step session:
206 219
207``` 220```
diff --git a/docs/TESTING.md b/docs/TESTING.md
index c68b6c4..ac07a3f 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -40,7 +40,7 @@ or a vendored OpenSSL.
40| `tests/blackjack.rs` | Card totals, naturals, hit/stand/double, dealer bust, S17, state parsing. | 40| `tests/blackjack.rs` | Card totals, naturals, hit/stand/double, dealer bust, S17, state parsing. |
41| `tests/crash.rs` | Multiplier curve, payout floor, crash-point distribution, house edge, cap. | 41| `tests/crash.rs` | Multiplier curve, payout floor, crash-point distribution, house edge, cap. |
42| `tests/protocol.rs` | Newline buffering and timeout/error classification. | 42| `tests/protocol.rs` | Newline buffering and timeout/error classification. |
43| `tests/roulette.rs` | Wheel, every bet type and payout, zero handling, cursor lattice, result parser. | 43| `tests/roulette.rs` | Wheel, every bet type and payout, zero handling, cursor grid (straight/split/corner), result parser. |
44| `tests/server_core.rs` | Handler, bcrypt migration, SQL injection, transaction rollback, `plays` audit, sessions. | 44| `tests/server_core.rs` | Handler, bcrypt migration, SQL injection, transaction rollback, `plays` audit, sessions. |
45| `tests/server_setup.rs` | `--init` identity generation, PKCS#12 loadability, overwrite refusal. | 45| `tests/server_setup.rs` | `--init` identity generation, PKCS#12 loadability, overwrite refusal. |
46| `tests/slots.rs` | Server slots payout rules and overflow handling. | 46| `tests/slots.rs` | Server slots payout rules and overflow handling. |
@@ -98,8 +98,11 @@ Use an 80-column terminal because several output lines are width-sensitive.
981. `play roulette` draws the full felt: 0, the 3x12 numbers, dozens, columns, 981. `play roulette` draws the full felt: 0, the 3x12 numbers, dozens, columns,
99 and the six outside cells, with the cursor on number 1. 99 and the six outside cells, with the cursor on number 1.
1002. Arrows move the cursor. On the numbers the highlighted cells show the bet: 1002. Arrows move the cursor. On the numbers the highlighted cells show the bet:
101 one number (straight), two (split), four (corner). Down leaves the felt into 101 one number (straight), two (split), four (corner). Every number and every
102 the dozens, then columns, then outside; Up walks back. 102 adjacent pair is reachable: from 1, Right is the 1/4 split and Right again is
103 number 4; Up is the 1/2 split and Up again is number 2. The status line names
104 the bet and its odds. Down leaves the felt into the dozens, then columns,
105 then outside; Up walks back.
1033. ENTER places the chip where the cursor is; `C` clears; `+`/`=`/`-` change the 1063. ENTER places the chip where the cursor is; `C` clears; `+`/`=`/`-` change the
104 chip size. The bets line lists every chip and the total. 107 chip size. The bets line lists every chip and the total.
1054. Space scrolls the wheel under a fixed ball marker and ends on the winning 1084. Space scrolls the wheel under a fixed ball marker and ends on the winning
@@ -113,6 +116,14 @@ Use an 80-column terminal because several output lines are width-sensitive.
1136. The result line names the number, color and parity, the total returned and 1166. The result line names the number, color and parity, the total returned and
114 the profit. The next spin reuses the placed chips. 117 the profit. The next spin reuses the placed chips.
115 118
119## Manual history check
120
1211. Play a few rounds across games, then run `history`.
1222. The table is newest first and shows the time, game, bet, winnings, balance
123 and a one-line result (`17 black`, `cashed 1.12x`, `none`, `win`).
1243. `history 2` shows two rows; `history 0` and `history nope` are rejected
125 without sending anything. A fresh account says `No plays recorded yet.`
126
116## Manual terminal size check 127## Manual terminal size check
117 128
1181. Start the client in a terminal smaller than 80x24: it must print 1291. Start the client in a terminal smaller than 80x24: it must print