summaryrefslogtreecommitdiffstats
path: root/docs/GAMES.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-29 18:22:40 +0100
committersalmonik <salmonik@tuta.io>2026-10-29 18:22:40 +0100
commitb5a52fc0312afdf5d5fbe53275dc88d6d881c2ff (patch)
treed12e3c7f6c23ae1698199d16ee763551edfd8c12 /docs/GAMES.md
parentv2.1.2: ignore ANSI when measuring board height (diff)
downloadzagan-bet-b5a52fc0312afdf5d5fbe53275dc88d6d881c2ff.tar.gz
zagan-bet-b5a52fc0312afdf5d5fbe53275dc88d6d881c2ff.zip
v2.2.0: add blackjack with reserved bets and hit/stand/double
Diffstat (limited to '')
-rw-r--r--docs/GAMES.md42
1 files changed, 33 insertions, 9 deletions
diff --git a/docs/GAMES.md b/docs/GAMES.md
index 12b0e7c..4c42369 100644
--- a/docs/GAMES.md
+++ b/docs/GAMES.md
@@ -6,17 +6,36 @@
6| --- | --- | --- | 6| --- | --- | --- |
7| Slots | Done | 5 reels x 3 rows, 5 paylines, 98.6% RTP | 7| Slots | Done | 5 reels x 3 rows, 5 paylines, 98.6% RTP |
8| Roulette | Done | European wheel, split bets, 97.3% RTP | 8| Roulette | Done | European wheel, split bets, 97.3% RTP |
9| Blackjack | Done | Six-deck shoe per hand, S17, 3:2, hit/stand/double |
9 10
10## Planned 11## Planned
11 12
12| Game | Shape | Main open decisions | 13| Game | Shape | Main open decisions |
13| --- | --- | --- | 14| --- | --- | --- |
14| Blackjack | Multi-step hand | Dealer hits/stands soft 17; double/split/insurance; blackjack payout; shoe persistence |
15| Crash | Real-time round | Crash-point distribution; cashout latency; provable fairness | 15| Crash | Real-time round | Crash-point distribution; cashout latency; provable fairness |
16 16
17Blackjack needs server-side hand state and player actions. Crash needs a timed 17Crash needs a timed round loop and a cashout action, so it should be its own
18round loop and a cashout action, so it should come after blackjack unless we 18protocol/loop change.
19redesign the loop first. 19
20## Blackjack
21
22- Six-deck shoe, shuffled fresh for every hand and discarded afterwards.
23- Dealer stands on all 17s (including soft 17).
24- Blackjack pays 3:2, rounded down to whole PLN.
25- Hit, stand, and double; no split, insurance, or surrender.
26- The bet is reserved when the hand starts. Cancel or disconnect refunds it.
27- A natural or dealer blackjack settles immediately.
28
29Client controls:
30
31```
32H hit
33S stand
34D double (on the first two cards)
35SPACE deal the next hand
36+ or = / - change the next hand's bet
37Q leave the table (active hand is cancelled and refunded)
38```
20 39
21## Roulette 40## Roulette
22 41
@@ -68,6 +87,9 @@ plays (
68 87
69// roulette 88// roulette
70{"number":"17","color":"black","bets":"{\"red\":10,\"black\":10,\"even\":10,\"odd\":10,\"numbers\":[{\"number\":17,\"amount\":5}]}"} 89{"number":"17","color":"black","bets":"{\"red\":10,\"black\":10,\"even\":10,\"odd\":10,\"numbers\":[{\"number\":17,\"amount\":5}]}"}
90
91// blackjack
92{"player":["10S","6H","5D"],"dealer":["9D","8C"],"player_total":21,"dealer_total":17,"bet":10,"result":"win","winnings":20}
71``` 93```
72 94
73The balance update and the `plays` insert happen in one transaction 95The balance update and the `plays` insert happen in one transaction
@@ -89,12 +111,14 @@ PLAY_START roulette <total> <bets-json>
89ROULETTE_RESULT <session> <winnings> <bet> <balance> <number> <color> <bets-json> 111ROULETTE_RESULT <session> <winnings> <bet> <balance> <number> <color> <bets-json>
90``` 112```
91 113
92Blackjack and crash still need a generic state/action exchange, for example: 114Blackjack is a multi-step session:
93 115
94``` 116```
95GAME_START <game> <bet> 117PLAY_START blackjack <bet>
96GAME_ACTION <action> [json] 118BLACKJACK_STATE <json>
97GAME_STATE <json> # cards, bets, multiplier, legal actions, result 119BLACKJACK_ACTION <session> hit|stand|double|cancel
120BLACKJACK_STATE <json>
98``` 121```
99 122
100That will be its own protocol change. 123`BLACKJACK_STATE` carries the player/dealer cards, totals, actions, balance,
124result and winnings. The dealer's hole card is `?` until the hand is done.