dkforest

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

commit f3657d10d4b368049f3cb8d581ef4d20ce259081
parent 40308380435c7cb3f6c7f956faa62c20b0c021b2
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue,  5 Dec 2023 17:14:02 -0500

cleanup

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

diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go @@ -301,7 +301,6 @@ func (g *PokerGame) Deal(roomID string) { Idx: idx, Top: BurnStackY + (pos * 2), Left: BurnStackX + (pos * 4), - Burn: true, } PokerPubSub.Pub(roomTopic, evt) g.Ongoing.Events = append(g.Ongoing.Events, evt) @@ -311,11 +310,12 @@ func (g *PokerGame) Deal(roomID string) { card = g.Ongoing.Deck[idx] idx++ evt := PokerEvent{ - ID: "card" + strconv.Itoa(idx), - Name: card, - Idx: idx, - Top: 150, - Left: 100 + (pos * 55), + ID: "card" + strconv.Itoa(idx), + Name: card, + Idx: idx, + Top: 150, + Left: 100 + (pos * 55), + Reveal: true, } PokerPubSub.Pub(roomTopic, evt) g.Ongoing.Events = append(g.Ongoing.Events, evt) @@ -350,7 +350,6 @@ func (g *PokerGame) Deal(roomID string) { Top: top, Left: left, Angle: d.Angle, - Burn: true, } g.Ongoing.Players[i].Cards = append(g.Ongoing.Players[i].Cards, PlayerCard{Idx: idx, Name: card}) PokerPubSub.Pub(roomTopic, evt) @@ -470,13 +469,13 @@ func (g *PokerGame) IsSeated(player string) (bool, int) { } type PokerEvent struct { - ID string - Idx int - Name string - Top int - Left int - Burn bool - Angle string + ID string + Idx int + Name string + Top int + Left int + Reveal bool + Angle string } type GameStartedEvent struct { @@ -940,7 +939,7 @@ body { if payload.Angle != "" { transform += ` rotateZ(` + payload.Angle + `)` } - if payload.Burn { + if !payload.Reveal { transform += ` rotateY(` + BackfacingDeg + `)` } transform += ";"