commit 36839acf2469ae29967df9f03e13740f64b31d81
parent 367c978828ed044e90af75a17366e60e95b6aebf
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sat, 16 Dec 2023 05:49:16 -0500
Add auto action all-in
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -491,6 +491,7 @@ const (
CallAction
CheckAction
BetAction
+ AllInAction
)
const (
@@ -691,6 +692,9 @@ RoundIsSettledLoop:
} else if evt.Bet > 0 {
autoCache[evt.Player] = AutoAction{v: BetAction, evt: evt}
PokerPubSub.Pub(roomUserTopic, AutoActionEvent{Message: "Will auto bet " + evt.Bet.String()})
+ } else if evt.AllIn {
+ autoCache[evt.Player] = AutoAction{v: AllInAction, evt: evt}
+ PokerPubSub.Pub(roomUserTopic, AutoActionEvent{Message: "Will auto all-in"})
}
return continueGetPlayerEventLoop
}
@@ -727,6 +731,8 @@ RoundIsSettledLoop:
actionResult = doCall()
case BetAction:
actionResult = doBet(autoAction.evt)
+ case AllInAction:
+ actionResult = doAllIn()
}
}
delete(autoCache, pUsername)