commit 05ce650221cb547c55cb04344e98c34195b05bcf
parent c2ad7c1ef938c431fba235bd03d28f10955763fc
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Mon, 4 Dec 2023 23:11:10 -0500
cleanup
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go
@@ -16,6 +16,7 @@ import (
)
const NbPlayers = 6
+const MaxUserCountdown = 10
type Poker struct {
sync.Mutex
@@ -114,7 +115,7 @@ func (g *PokerGame) Deal(roomID string) {
PokerPubSub.Pub(myTopic, evt)
g.Ongoing.WaitTurnEvent = evt
fmt.Println("WAIT FOR ACTION", p)
- waitCh := time.After(10 * time.Second)
+ waitCh := time.After(MaxUserCountdown * time.Second)
LOOP:
for {
var evt PlayerEvent
@@ -261,6 +262,7 @@ func (g *PokerGame) Deal(roomID string) {
// Wait a minimum of X seconds before allowing a new game
time.Sleep(10 * time.Second)
g.IsGameOver = true
+ fmt.Println("GAME IS OVER")
}()
}