dkforest

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

commit 78e8a718c1c0e6a5c30770f85f4a4de90ef390f3
parent cc5b9df548560b05cdd8054724f0fad6a7562c27
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri,  8 Dec 2023 00:24:03 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -466,10 +466,7 @@ OUTER: newLogEvent(g, roomLogsTopic, fmt.Sprintf("%s check", p.Username)) } else if evt.Call { - bet := minBet - p.Bet - if p.Cash < bet { // All in - bet = p.Cash - } + bet := utils.MinInt(minBet-p.Bet, p.Cash) p.doBet(bet) PokerPubSub.Pub(roomTopic, PlayerBetEvent{PlayerIdx: p.SeatIdx, Player: p.Username, Bet: bet, TotalBet: p.Bet, Cash: p.Cash}) logMsg := fmt.Sprintf("%s call (%d)", p.Username, bet)