dkforest

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

commit f84aa9fce586cc72eccbd88003b692350c74b572
parent f7ba093f2198497569e5bb386f42e0f4f94fab77
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon, 18 Dec 2023 04:20:41 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -1791,20 +1791,20 @@ func buildActionsDiv(roomID RoomID) (html string) { } func buildSeatsHtml(g *PokerGame, authUser *database.User, playerBuyIn database.PokerChip) (html string) { - g.Players.RLock() - defer g.Players.RUnlock() - for i := range *g.Players.Val() { - html += `<div id="seat` + itoa(i+1) + `Pot" class="seatPot"></div>` - } - html += `<div>` - for i := range *g.Players.Val() { - html += `<div class="seat" id="seat` + itoa(i+1) + `"> + g.Players.RWith(func(gPlayers *[]*SeatedPlayer) { + for i := range *gPlayers { + html += `<div id="seat` + itoa(i+1) + `Pot" class="seatPot"></div>` + } + html += `<div>` + for i := range *gPlayers { + html += `<div class="seat" id="seat` + itoa(i+1) + `"> <iframe src="/poker/` + g.RoomID.String() + `/sit/` + itoa(i+1) + `?buy-in=` + itoa2(playerBuyIn) + `" class="takeSeat takeSeat` + itoa(i+1) + `"></iframe>` - html += ` <div class="inner"></div>` - html += ` <div id="seat` + itoa(i+1) + `_cash" class="cash"></div>` + html += ` <div class="inner"></div>` + html += ` <div id="seat` + itoa(i+1) + `_cash" class="cash"></div>` + html += `</div>` + } html += `</div>` - } - html += `</div>` + }) html += drawSeatsStyle(authUser, g) return html }