dkforest

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

commit 38779266aa30b72c6565a68ded53adaee7b6ac8e
parent 87d7d77ad07de136d97b9a52908f4fad652cc4f1
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri, 15 Dec 2023 04:45:59 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -112,15 +112,6 @@ func (p *PokerStandingPlayer) isEligible(pokerTableMinBet database.PokerChip) bo return p != nil && p.Cash >= pokerTableMinBet } -func (p *PokerStandingPlayer) getDisplayCash(g *PokerGame) database.PokerChip { - if g.Ongoing != nil { - if op := g.Ongoing.GetPlayer(p.Username); op != nil && !op.Unsit.Load() { - return op.Cash - } - } - return p.Cash -} - type PokerPlayer struct { *PokerStandingPlayer RoundTotalBet database.PokerChip @@ -1630,7 +1621,7 @@ func drawSeatsStyle(authUser *database.User, g *PokerGame) string { html += `#seat` + itoa(i+1) + ` { border: 2px solid #0d1b8f; }` } html += `#seat` + itoa(i+1) + ` .inner:before { content: "` + pUsername.String() + `"; }` - html += `#seat` + itoa(i+1) + `_cash:before { content: "` + itoa2(p.getDisplayCash(g)) + `"; }` + html += `#seat` + itoa(i+1) + `_cash:before { content: "` + itoa2(p.Cash) + `"; }` if g.Ongoing != nil { if op := g.Ongoing.GetPlayer(pUsername); op != nil && op.Bet > 0 { html += `#seat` + itoa(i+1) + `Pot:before { content: "` + itoa2(op.Bet) + `"; }` @@ -1673,7 +1664,7 @@ func drawGameIsDoneHtml(g *PokerGame, evt GameIsDoneEvent) (html string) { html += `<style>` for i, p := range g.Players { if p != nil { - html += `#seat` + itoa(i+1) + `_cash:before { content: "` + itoa2(p.getDisplayCash(g)) + `"; }` + html += `#seat` + itoa(i+1) + `_cash:before { content: "` + itoa2(p.Cash) + `"; }` } } html += `#winner:before { content: "Winner: ` + evt.Winner + ` (` + evt.WinnerHand + `)"; }`