dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 481fde9766731ba26f69f40ee6805f038f34bef1
parent 9cb8d1e89200452877df3beee2d9f0cb2a91ceef
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun, 24 Dec 2023 10:40:38 -0500

cleanup

Diffstat:
Mpkg/web/handlers/poker/poker.go | 9++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -873,18 +873,13 @@ func doBet(g *PokerGame, p *pokerPlayer, minRaise := g.ongoing.MinRaise.Get() playerBet := p.bet.Get() bet := evt.Bet + (minBet - playerBet) + playerTotalBet := bet + playerBet if bet >= p.cash.Get() { return doAllIn(g, p, newlyAllInPlayers, lastBetPlayerIdx, playerToPlayIdx) } - playerTotalBet := playerBet + bet betLbl := utils.Ternary(g.IsBet(), "bet", "raise") // Ensure the player cannot bet below the table minimum bet (amount of the big blind) - if bet < minRaise { - msg := fmt.Sprintf("%s (%d) is too low. Must %s at least %d", betLbl, evt.Bet, betLbl, minRaise) - PokerPubSub.Pub(roomUserTopic, ErrorMsgEvent{Message: msg}) - return continueGetPlayerEventLoop - } - if playerTotalBet < minBet+minRaise { + if evt.Bet < minRaise { msg := fmt.Sprintf("%s (%d) is too low. Must %s at least %d", betLbl, evt.Bet, betLbl, minRaise) PokerPubSub.Pub(roomUserTopic, ErrorMsgEvent{Message: msg}) return continueGetPlayerEventLoop