dkforest

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

commit e103695b99a919c1fc46692ea7ac9df0f7c085b0
parent 1699d54cdb9f3a3dde59fb47bfca5ee3a475186a
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sun, 24 Dec 2023 12:10:39 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -792,8 +792,9 @@ func doTimeout(g *PokerGame, p *pokerPlayer, playerAlive *int) int { } func doCheck(g *PokerGame, p *pokerPlayer) int { - if p.GetBet() < g.ongoing.MinBet.Get() { - msg := fmt.Sprintf("Need to bet %d", g.ongoing.MinBet.Get()-p.GetBet()) + minBet := g.ongoing.MinBet.Get() + if p.GetBet() < minBet { + msg := fmt.Sprintf("Need to bet %d", minBet-p.GetBet()) PokerPubSub.Pub(g.roomID.UserTopic(p.userID), ErrorMsgEvent{Message: msg}) return continueGetPlayerEventLoop }