dkforest

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

commit aa4c75e5b6a34f2a6009a0646144a5b4ec5cf514
parent 8d27cd448ed19814ca081b20baeecd34565e042f
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 21 Dec 2023 22:41:22 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -852,24 +852,11 @@ func applyAutoAction(g *PokerGame, p *pokerPlayer, minBet *database.PokerChip, roomUserTopic := g.roomID.UserTopic(pUserID) if autoAction.action > NoAction { time.Sleep(500 * time.Millisecond) - p.lastActionTS = time.Now() - switch autoAction.action { - case NoAction: - case FoldAction: - actionResult = doFold(g, p, minBet, playerAlive) - case CheckAction: - actionResult = doCheck(g, p, minBet) - case CallAction: - actionResult = doCall(g, p, minBet, newlyAllInPlayers) - case AllInAction: - actionResult = doAllIn(g, p, minBet, newlyAllInPlayers, lastRaisePlayerIdx, playerToPlayIdx) - case BetAction: - actionResult = doBet(g, p, minBet, newlyAllInPlayers, lastRaisePlayerIdx, playerToPlayIdx, autoAction.evt) - } + actionResult = handlePlayerActionEvent(g, p, minBet, newlyAllInPlayers, lastRaisePlayerIdx, playerAlive, playerToPlayIdx, autoAction.evt) } delete(autoCache, pUserID) setAutoAction(g, roomUserTopic, "") - return + return actionResult } func handlePlayerActionEvent(g *PokerGame, p *pokerPlayer, minBet *database.PokerChip,