From 90ad8c0c33b519d5830c69d4128bdc984b5e9de8 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 5 Oct 2026 14:22:14 -0400 Subject: feat: cryptocurrency exchange added to casino --- internal/net/server.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'internal/net') diff --git a/internal/net/server.go b/internal/net/server.go index 5cf7310..6367419 100644 --- a/internal/net/server.go +++ b/internal/net/server.go @@ -66,6 +66,14 @@ type Session struct { PendingUndigDir string PendingUndigRoom int // Casino spectator preferences are session-local, owner-goroutine only. + CryptoActive bool + CryptoBusy bool + CryptoEpoch uint64 + CryptoCancel context.CancelFunc + CryptoSelected string + CryptoScreen string + CryptoShowHints bool + CryptoUnavailable bool PredictionActive bool PredictionEpoch uint64 PredictionCancel context.CancelFunc @@ -518,6 +526,17 @@ func (h *Hub) EnterRoom(s *Session, roomID int) { // room stops it, so leaving and returning does not silently resume it. s.CasinoWatchRoom = 0 s.CasinoWatchTable = "" + s.CryptoActive = false + s.CryptoEpoch++ + s.CryptoBusy = false + s.CryptoSelected = "" + s.CryptoScreen = "" + s.CryptoShowHints = false + s.CryptoUnavailable = false + if s.CryptoCancel != nil { + s.CryptoCancel() + s.CryptoCancel = nil + } s.PredictionActive = false if s.PredictionCancel != nil { s.PredictionCancel() -- cgit v1.2.3