dkforest

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

commit adfd3fcf7c1b91333b925ab2ae641e77f3146c17
parent 1242c8941ad81694b4b3ea3e730fb159674cb683
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 18 Dec 2023 23:54:51 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -52,7 +52,7 @@ func (p *Poker) GetOrCreateGame(db *database.DkfDB, roomID RoomID, pokerTableID g, found := p.games[roomID] if !found { g = &PokerGame{ - DB: db, + db: db, RoomID: roomID, PokerTableID: pokerTableID, TableType: TableTypeRake, @@ -207,7 +207,7 @@ type PlayerCard struct { } type PokerGame struct { - DB *database.DkfDB + db *database.DkfDB RoomID RoomID PokerTableID int64 TableType int @@ -785,7 +785,7 @@ func handlePlayerActionEvent(g *PokerGame, p *PokerPlayer, db *database.DkfDB, m // Return either or not the game ended because only 1 player left playing (or none) func execBettingRound(g *PokerGame, skip int, minBet database.PokerChip) bool { - db := g.DB + db := g.db ongoing := g.Ongoing roomID := g.RoomID roomTopic := roomID.Topic() @@ -1163,7 +1163,7 @@ func applyBigBlindBet(g *PokerGame, bigBlindBet database.PokerChip, bbIdx int) { func applyBlindBet(g *PokerGame, playerIdx int, bet database.PokerChip, name string) { p := g.Ongoing.Players[playerIdx] - p.doBetAndNotif(g.DB, g.PokerTableID, bet, g.RoomID.Topic()) + p.doBetAndNotif(g.db, g.PokerTableID, bet, g.RoomID.Topic()) g.newLogEvent(fmt.Sprintf("%s %s %d", p.Username, name, bet)) } @@ -1204,7 +1204,7 @@ func applyGains(g *PokerGame, playersGain []PlayerGain, mainPot, rake database.P ongoing := g.Ongoing pokerTableID := g.PokerTableID nbPlayersGain := len(playersGain) - g.DB.With(func(tx *database.DkfDB) { + g.db.With(func(tx *database.DkfDB) { if nbPlayersGain >= 1 { winnerHand = utils.Ternary(nbPlayersGain == 1, playersGain[0].HandStr, "Split pot")