commit 6d0fda93a71448c6c5df77bb738af75f39e6363c
parent c2d16966f73560a1284d550956bfe1f98b3b01cf
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 7 Dec 2023 19:58:41 -0500
fix
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -459,11 +459,10 @@ OUTER:
} else if evt.Call {
bet := minBet - p.Bet
- if p.Cash < bet {
- p.doBet(p.Cash) // All in
- } else {
- p.doBet(bet)
+ if p.Cash < bet { // All in
+ bet = p.Cash
}
+ p.doBet(bet)
PokerPubSub.Pub(roomTopic, PlayerBetEvent{PlayerIdx: p.SeatIdx, Player: p.Username, Bet: bet, TotalBet: p.Bet, Cash: p.Cash})
newLogEvent(g, roomLogsTopic, fmt.Sprintf("%s call", p.Username))