dkforest

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

commit 6c3d7b310858a849a79c0f294ebefdcf9f7bf7fa
parent bab474c070c66a26e841b2864ad6d4bebd97abee
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Mon,  4 Dec 2023 21:20:57 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go @@ -140,15 +140,15 @@ func (g *PokerGame) Deal(roomID string) { var card string idx := 0 - burnCard := func() { + burnCard := func(pos int) { idx++ card, g.Ongoing.Deck = g.Ongoing.Deck[0], g.Ongoing.Deck[1:] evt := PokerEvent{ ID: "card" + strconv.Itoa(idx), Name: "", Idx: idx, - Top: 34, - Left: 408, + Top: 30 + (pos * 2), + Left: 400 + (pos * 4), Burn: true, } PokerPubSub.Pub(myTopic, evt) @@ -205,7 +205,7 @@ func (g *PokerGame) Deal(roomID string) { // Burn time.Sleep(time.Second) - burnCard() + burnCard(0) // Flop (3 first cards) for i := 1; i <= 3; i++ { @@ -218,7 +218,7 @@ func (g *PokerGame) Deal(roomID string) { // Burn time.Sleep(time.Second) - burnCard() + burnCard(1) // Turn (4th card) time.Sleep(time.Second) @@ -229,7 +229,7 @@ func (g *PokerGame) Deal(roomID string) { // Burn time.Sleep(time.Second) - burnCard() + burnCard(2) // River (5th card) time.Sleep(time.Second)