commit ae0e5e66a48c5f804c937382899b3070ca36fa28
parent 8203c593d01fcc7951e68f66b6f44f73b2b9ca0b
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Mon, 11 Dec 2023 21:59:05 -0500
cleanup
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -192,6 +192,10 @@ func (g *Ongoing) computeWinners() (winner []GameResult) {
playerCard2 := p.Cards[1].Name
p.CardsMtx.RUnlock()
+ if len(g.CommunityCards) != 5 {
+ return []GameResult{}
+ }
+
hand := []poker.Card{
poker.NewCard(cardToPokerCard(g.CommunityCards[0])),
poker.NewCard(cardToPokerCard(g.CommunityCards[1])),