dkforest

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

commit 1740a3ed7d3429c5860eb7c44bca5087debf3b39
parent 23e5b71aa9f2ea00ea6c970b24099076d68e0883
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri, 15 Dec 2023 15:21:43 -0500

fix minBet

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -613,7 +613,7 @@ RoundIsSettledLoop: if (p.Bet + bet) > minBet { lastRaisePlayerIdx = playerToPlayIdx } - minBet = p.Bet + bet + minBet = utils.MaxInt(p.Bet+bet, minBet) p.doBet(db, bet, g.PokerTableID) PokerPubSub.Pub(roomTopic, PlayerBetEvent{PlayerSeatIdx: p.SeatIdx, Player: pUsername, Bet: bet, TotalBet: p.Bet, Cash: p.Cash}) logMsg := fmt.Sprintf("%s all-in (%d)", pUsername, bet) @@ -644,7 +644,7 @@ RoundIsSettledLoop: if (p.Bet + bet) > minBet { lastRaisePlayerIdx = playerToPlayIdx } - minBet = p.Bet + bet + minBet = utils.MaxInt(p.Bet+bet, minBet) p.doBet(db, bet, g.PokerTableID) PokerPubSub.Pub(roomTopic, PlayerBetEvent{PlayerSeatIdx: p.SeatIdx, Player: pUsername, Bet: bet, TotalBet: p.Bet, Cash: p.Cash}) logMsg := fmt.Sprintf("%s bet %d", pUsername, bet)