commit ebad1bb0e900c730ab27d475f0f1c2cc991c72ef
parent e5b23d81f4dbcc2c33f6ac3072646940bbbdbf82
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 12 Dec 2023 19:11:23 -0500
cleanup
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -891,6 +891,7 @@ END:
winners := g.Ongoing.computeWinners()
mainPot := int(g.Ongoing.MainPot.Load())
playersGain := processPot(winners, mainPot)
+
var winnersStr, winnerHand string
if len(playersGain) >= 1 {
if len(playersGain) == 1 {
@@ -1028,9 +1029,9 @@ func processPot(winners []GameResult, mainPot int) (res []PlayerGain) {
// TODO: these chips should be given to the stronger hand first
idx := 0
for mainPot > 0 {
- res[idx].Gain += 1
- idx = (idx + 1) % len(res)
+ res[idx].Gain++
mainPot--
+ idx = (idx + 1) % len(res)
}
return res
}