dkforest

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

commit 21127b582b5a5d9925ad3baadda983fc55974f34
parent 5e5d49d0e4802a0e5e025ccdba5c902e802967f8
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 25 Dec 2023 12:30:46 -0500

cleanup

Diffstat:
Mpkg/web/handlers/poker/poker.go | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -1507,10 +1507,6 @@ func calculateRake(mainPot, pokerTableMinBet database.PokerChip, nbPlayers int) } func processPot(winners []gameResult, mainPot, pokerTableMinBet database.PokerChip, collectRake bool, nbPlayers int) (res []PlayerGain, rake database.PokerChip) { - newPlayerGain := func(player *PokerPlayer, gain database.PokerChip, groupIdx int, handStr string) PlayerGain { - return PlayerGain{Player: player, Gain: gain, Group: groupIdx, HandStr: handStr} - } - if len(winners) == 0 { logrus.Error("winners has len 0") return @@ -1536,7 +1532,7 @@ func processPot(winners []gameResult, mainPot, pokerTableMinBet database.PokerCh expectedSplit := calcExpectedSplit(mainPot, allInCount) for _, p := range groupPlayers { piece := utils.MinInt(p.maxGain(mainPot), expectedSplit) - res = append(res, newPlayerGain(p, piece, groupIdx, handStr)) + res = append(res, PlayerGain{Player: p, Gain: piece, Group: groupIdx, HandStr: handStr}) mainPot -= piece if p.isAllIn() { allInCount++