commit c2e2ab9748b15c988665b37846da405d4aa40127
parent 7a7cf10fcb603fb7b332406d022b4acad3aa3960
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 14 Dec 2023 01:24:23 -0500
cleanup
Diffstat:
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -895,11 +895,7 @@ END:
var winnersStr, winnerHand string
if len(playersGain) >= 1 {
- if len(playersGain) == 1 {
- winnerHand = playersGain[0].HandStr
- } else if len(playersGain) > 1 {
- winnerHand = "Split pot"
- }
+ winnerHand = utils.Ternary(len(playersGain) == 1, playersGain[0].HandStr, "Split pot")
tx := db.Begin()
for _, el := range playersGain {
newLogEvent(g, roomLogsTopic, fmt.Sprintf("Winner #%d: %s %s -> %d", el.Group, el.Player.Username, el.HandStr, el.Gain))