diff options
Diffstat (limited to 'docs/GAMES.md')
| -rw-r--r-- | docs/GAMES.md | 42 |
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 | ||
| 17 | Blackjack needs server-side hand state and player actions. Crash needs a timed | 17 | Crash needs a timed round loop and a cashout action, so it should be its own |
| 18 | round loop and a cashout action, so it should come after blackjack unless we | 18 | protocol/loop change. |
| 19 | redesign 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 | |||
| 29 | Client controls: | ||
| 30 | |||
| 31 | ``` | ||
| 32 | H hit | ||
| 33 | S stand | ||
| 34 | D double (on the first two cards) | ||
| 35 | SPACE deal the next hand | ||
| 36 | + or = / - change the next hand's bet | ||
| 37 | Q 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 | ||
| 73 | The balance update and the `plays` insert happen in one transaction | 95 | The balance update and the `plays` insert happen in one transaction |
| @@ -89,12 +111,14 @@ PLAY_START roulette <total> <bets-json> | |||
| 89 | ROULETTE_RESULT <session> <winnings> <bet> <balance> <number> <color> <bets-json> | 111 | ROULETTE_RESULT <session> <winnings> <bet> <balance> <number> <color> <bets-json> |
| 90 | ``` | 112 | ``` |
| 91 | 113 | ||
| 92 | Blackjack and crash still need a generic state/action exchange, for example: | 114 | Blackjack is a multi-step session: |
| 93 | 115 | ||
| 94 | ``` | 116 | ``` |
| 95 | GAME_START <game> <bet> | 117 | PLAY_START blackjack <bet> |
| 96 | GAME_ACTION <action> [json] | 118 | BLACKJACK_STATE <json> |
| 97 | GAME_STATE <json> # cards, bets, multiplier, legal actions, result | 119 | BLACKJACK_ACTION <session> hit|stand|double|cancel |
| 120 | BLACKJACK_STATE <json> | ||
| 98 | ``` | 121 | ``` |
| 99 | 122 | ||
| 100 | That will be its own protocol change. | 123 | `BLACKJACK_STATE` carries the player/dealer cards, totals, actions, balance, |
| 124 | result and winnings. The dealer's hole card is `?` until the hand is done. | ||
