dkforest

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

commit 309e6fe11c1b710d4b90af19233d6cb951b04b12
parent 43dae81b779cc0f9725928713e656eb3cd4003a1
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu,  7 Dec 2023 23:35:36 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -780,7 +780,7 @@ END: g.PlayersMtx.RUnlock() g.IsGameDone.Store(true) - deckStr := strings.Join(g.Ongoing.Deck, "") + deckStr := g.Ongoing.getDeckStr() PokerPubSub.Pub(roomTopic, GameIsDoneEvent{DeckStr: deckStr, Winner: winnersStr, WinnerHand: winnerHand}) newLogEvent(g, roomLogsTopic, fmt.Sprintf("Game ended, deck: %s", deckStr)) @@ -1227,7 +1227,6 @@ func drawGameIsDoneHtml(g *PokerGame, evt GameIsDoneEvent) (html string) { g.PlayersMtx.RLock() defer g.PlayersMtx.RUnlock() html += `<style>` - html += `#deckStr:before { content: "` + evt.DeckStr + `"; }` for i, p := range g.Players { if p != nil { html += `#seat` + itoa(i+1) + `_cash:before { content: "` + itoa(p.Cash) + `"; }` @@ -1255,7 +1254,6 @@ func drawResetCardsEvent() (html string) { #yourCard1:before { content: ""; } #yourCard2:before { content: ""; } #deckHash:before { content: ""; } - #deckStr:before { content: ""; } #winner:before { content: ""; } #mainPot:before { content: "Pot: 0"; } </style>` @@ -1633,8 +1631,6 @@ func PokerHandler(c echo.Context) error { send(buildMainPotHtml(g)) send(buildWinnerHtml()) send(buildCountdownsHtml()) - - send(`<div id="deckStr"></div>`) send(`<div id="deckHash"></div>`) if g.Ongoing != nil { @@ -1642,9 +1638,6 @@ func PokerHandler(c echo.Context) error { send(drawCountDownStyle(g.Ongoing.WaitTurnEvent)) g.Ongoing.WaitTurnEventMtx.RUnlock() send(`<style>#deckHash:before { content: "` + g.Ongoing.GetDeckHash() + `"; }</style>`) - if g.IsGameDone.Load() { - send(`<style>#deckStr:before { content: "` + g.Ongoing.GetDeckStr() + `"; }</style>`) - } g.Ongoing.EventsMtx.RLock() for _, evt := range g.Ongoing.Events {