Here's how it would work :
- Upon seeing the command string !P play <ante> in chat, the bot starts a one minute timer.
- People wanting to play send a string in the format !P join <base64 string up to 64 characters in length> via private message to the bot.
- Bot constructs a list of all players that joined, ordered by the time it received the pms. Only players holding at least twice the ante in balance with the bot may participate. Players can increase their balance at any point via a !!pay PokerBot command at any time, but are only credited for future deals.
- At the expiry of the timer in 1, bot says in channel either a) "Not enough players registered" if fewer than two players satisfied 2 above or else b) "Game <counter> starting ; <player names>i players seated ; my seed is <seed>" otherwise. The bot's seed will be a random base64 string 64 characters long.
- Bot constructs a pot, out of the antes paid by the players minus half of one (which it keeps). The pot will be incremented by all the ulterior bids of the players (limited to the amount a player's balance permits) ; the winner takes the pot. Side bets will be handled correctly.
- Bot constructs a deck order, through a publishedii process that transparently relies on a hash of a concatenation of the seeds (players' and the bot's).iii
- Bot deals the cards, and PMs each player his hand. Bot announces the face-up card in chativ.
- Bot prompts players to bid, in order, and announces bid acceptance. Something like "joe bid x, pot at y. moe, that's z to you." ; "fold" is the default bid, and the bot will introduce it if it doesn't hear better within a minute. Players bidding more than their balance with the bot will be deemed "all in". Player bids which consist of less than their balance and less than their call will be ignored. Once bidding is satisfied, bot announces second and third cards in chan, in the same manner, then announces the winner along with everyone's seeds.v The deal is closed and the winner gets the pot credited to his name. Intervening !!pay-ments are processed (added to / substracted from players' balances).
- !P hints toggles on and off the bot's hint system. This should be a for-pay service whereby the bot pms the subscribing player statistical data about the hand as far as the player's knowledge extends, things like pot odds, probabilities of other players winning / making their straight and so on. Bot can charge however many satoshis per hand for this.
Who wants to make it happen ?———
- Each player's balance with the bot should be printed in paranthesis after their name. [↩]
- Including it in the response to !P help works for the purpose of satisfying this criteria. [↩]
- This system makes it impractical for the botmaster to cheat.
The possibility of cheating remains where people show each other their hand during play, but on one hand everyone playing thereby gives his word of honor he won't, and on the other hand nobody can know whether they've been lied to or not until the final line, so... Don't play with people you don't trust, what can I tell you. [↩]
- Something like As, Qh, Td, 5c etc works fine. A bridge hand might look like AQJs T8h 742d QT863c, but this is poker so things are simpler.
And yes I mean thereby that next step (after this is stable) is getting it to also play bridge. Why the hell not, rite ? [↩]
- The cost of playing digital poker is that you can't really flop cards, sadly. [↩]