dkforest

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

commit 40308380435c7cb3f6c7f956faa62c20b0c021b2
parent f9ad065a2bf0d4d4a8f5465c3c86b4e525ed2e5d
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue,  5 Dec 2023 17:09:27 -0500

no deal to broke people

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

diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go @@ -329,6 +329,9 @@ func (g *PokerGame) Deal(roomID string) { if p == nil { continue } + if p.Cash == 0 { + continue + } d := seats[i] time.Sleep(time.Second) card = g.Ongoing.Deck[idx] @@ -427,6 +430,7 @@ func (g *PokerGame) Deal(roomID string) { winner.Cash += g.Ongoing.MainPot g.Ongoing.MainPot = 0 + // Sync "ongoing players" with "room players" objects for idx := range g.Players { if g.Ongoing.Players[idx] != nil { g.Players[idx].Cash = g.Ongoing.Players[idx].Cash