dkforest

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

commit 19fceb6b49257c7d007dd70ec61323c80865d873
parent e8179c3dab5667ca4445fc8361f4a05960babcf7
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri, 15 Dec 2023 17:32:52 -0500

cleanup booting players

Diffstat:
Mpkg/web/handlers/poker/poker.go | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -965,12 +965,17 @@ END: for idx, p := range g.Players { playerShallBeBooted := false if p != nil && p.LastActionTS.Before(g.Ongoing.CreatedAt) { + // If the player was playing the game, must be booted if he had the chance to make actions and did not. if op := g.Ongoing.GetPlayer(p.Username); op != nil { if op.countChancesToAction > 0 { playerShallBeBooted = true } + } else { - playerShallBeBooted = true + // If the player was not playing the game, must be booted if he's not eligible to play the next one. + if p.isEligible(g.PokerTableMinBet) { + playerShallBeBooted = true + } } } if playerShallBeBooted {