commit 2376c0a18ac187dbcac69dfc1fc41f251785ee44
parent d1e30350ff5f6752a8bf623bb8a82eb84162761a
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 5 Dec 2023 16:00:23 -0500
impl check
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go
@@ -186,6 +186,10 @@ func (g *PokerGame) Deal(roomID string) {
player.Folded = true
PokerPubSub.Pub(roomTopic, PlayerFoldEvent{Card1Idx: player.Cards[0].Idx, Card2Idx: player.Cards[1].Idx})
} else if evt.Check {
+ if g.Ongoing.Players[i].Bet < minBet {
+ fmt.Println("NEED TO BET", minBet-g.Ongoing.Players[i].Bet)
+ continue
+ }
} else if evt.Call {
bet := minBet - g.Ongoing.Players[i].Bet
if g.Ongoing.Players[i].Cash < bet {