dkforest

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

commit f6fffe0885741440a60ff18a0523232f2da8d1a6
parent a21738522d47b4b08e33f39476b285cb9e3516a6
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 25 Dec 2023 15:43:18 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -89,7 +89,7 @@ func (p *Poker) newGame(db *database.DkfDB, roomID RoomID, pokerTableID int64, roomID: roomID, pokerTableID: pokerTableID, tableType: TableTypeRake, - PokerTableMinBet: pokerTableMinBet, + pokerTableMinBet: pokerTableMinBet, pokerTableIsTest: pokerTableIsTest, playersEventCh: make(chan playerEvent), Players: rwmtx.New(make(seatedPlayers, NbPlayers)), @@ -186,7 +186,7 @@ func (g *Game) getEligibles() (out seatedPlayers) { eligiblePlayers := make(seatedPlayers, 0) g.Players.RWith(func(gPlayers seatedPlayers) { for _, p := range gPlayers { - if p.isEligible(g.PokerTableMinBet) { + if p.isEligible(g.pokerTableMinBet) { eligiblePlayers = append(eligiblePlayers, p) } } @@ -337,7 +337,7 @@ type Game struct { roomID RoomID pokerTableID int64 tableType int - PokerTableMinBet database.PokerChip + pokerTableMinBet database.PokerChip pokerTableIsTest bool playersEventCh chan playerEvent dealerSeatIdx atomic.Int32 @@ -966,8 +966,8 @@ func execBettingRound(g *Game, skip int, minBet database.PokerChip) bool { roomID := g.roomID roomTopic := roomID.Topic() g.ongoing.minBet.Set(minBet) - g.ongoing.minRaise.Set(g.PokerTableMinBet) - PubSub.Pub(roomTopic, PokerMinRaiseUpdatedEvent{MinRaise: g.PokerTableMinBet}) + g.ongoing.minRaise.Set(g.pokerTableMinBet) + PubSub.Pub(roomTopic, PokerMinRaiseUpdatedEvent{MinRaise: g.pokerTableMinBet}) db := g.db ongoing := g.ongoing _, dealerIdx := ongoing.getPlayerBySeatIdx(int(g.dealerSeatIdx.Load())) @@ -1243,7 +1243,7 @@ func dealerThread(g *Game, eligiblePlayers seatedPlayers) { roomID := g.roomID roomTopic := roomID.Topic() - bigBlindBet := g.PokerTableMinBet + bigBlindBet := g.pokerTableMinBet collectRake := false ongoing := g.ongoing isHeadsUpGame := ongoing.isHeadsUpGame() @@ -1271,7 +1271,7 @@ func dealerThread(g *Game, eligiblePlayers seatedPlayers) { applyBigBlindBet(g, bigBlindBet, bbIdx) time.Sleep(animationTime) g.ongoing.hasBet.Set(true) - g.ongoing.minRaise.Set(g.PokerTableMinBet) + g.ongoing.minRaise.Set(g.pokerTableMinBet) // Deal players cards dealPlayersCards(g, seats, &idx) @@ -1386,7 +1386,7 @@ func applyBlindBet(g *Game, playerIdx int, bet database.PokerChip, name string) func autoUnsitInactivePlayers(g *Game) { ongoing := g.ongoing - pokerTableMinBet := g.PokerTableMinBet + pokerTableMinBet := g.pokerTableMinBet g.Players.With(func(gPlayers *seatedPlayers) { for _, p := range *gPlayers { if playerShouldBeBooted(p, ongoing, pokerTableMinBet) {