dkforest

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

commit 89606507485c9b8ccf5321607a21bbdc8a5ce4bf
parent 464ac938ef0455069273d0f7ee2d1ae3ff551819
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri,  8 Dec 2023 04:40:46 -0500

clenaup

Diffstat:
Mpkg/web/handlers/poker/poker.go | 12++----------
1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -296,7 +296,7 @@ func NewOngoing(g *PokerGame) *Ongoing { players := make([]*PokerPlayer, 0) g.PlayersMtx.RLock() for idx, p := range g.Players { - if p != nil && p.Cash > 0 { + if p != nil && p.Cash >= BigBlindBet { players = append(players, &PokerPlayer{Username: p.Username, Cash: p.Cash, SeatIdx: idx}) } } @@ -628,7 +628,6 @@ func dealerThread(db *database.DkfDB, g *PokerGame, roomID string) { time.Sleep(time.Second) card = g.Ongoing.Deck[idx] idx++ - name := "" left := seatData.Left top := seatData.Top if cardIdx == 2 { @@ -636,14 +635,7 @@ func dealerThread(db *database.DkfDB, g *PokerGame, roomID string) { top = seatData.Top2 } - evt := PokerEvent{ - ID: "card" + itoa(idx), - Name: name, - Idx: idx, - Top: top, - Left: left, - Angle: seatData.Angle, - } + evt := PokerEvent{ID: "card" + itoa(idx), Name: "", Idx: idx, Top: top, Left: left, Angle: seatData.Angle} PokerPubSub.Pub(roomTopic, evt) PokerPubSub.Pub(roomTopic+"_"+p.Username, YourCardEvent{Idx: cardIdx, Name: card})