commit 3f6e4ec3ccff26b3c14cba73c8f40b78bdf58445
parent d02f251ddfd760b7ea9f94dd392f6452dece9128
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Fri, 15 Dec 2023 06:01:31 -0500
cleanup
Diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -502,10 +502,8 @@ func waitPlayersActionFn(db *database.DkfDB, g *PokerGame, roomID RoomID, skip i
// Avoid asking for actions if only 1 player can do so (because others are all-in)
nbCanVote := g.Ongoing.CountCanVotePlayers()
- if nbCanVote == 0 {
- goto END1
- } else if nbCanVote == 1 {
- goto END1
+ if nbCanVote == 0 || nbCanVote == 1 {
+ goto RoundIsSettled
}
// TODO: implement maximum re-raise
@@ -661,7 +659,7 @@ RoundIsSettledLoop:
}
} // End of repeat until the round is settled (all players have equals bet or fold or all-in)
-END1:
+RoundIsSettled:
newLogEvent(g, roomLogsTopic, fmt.Sprintf("--"))
setWaitTurn(g, roomTopic, -1)