aboutsummaryrefslogtreecommitdiff
path: root/internal/net/server.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 14:22:14 -0400
committerhistoria <[not public]>2026-10-05 14:22:14 -0400
commit90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (patch)
treec10bc0bebfbed6fde01a7f08cf6e2d98809b91a7 /internal/net/server.go
parentc84a9944356f590d90d819d652bdf1349ebacd40 (diff)
downloadthehouseoficarus-90ad8c0c33b519d5830c69d4128bdc984b5e9de8.tar.gz
feat: cryptocurrency exchange added to casino
Diffstat (limited to 'internal/net/server.go')
-rw-r--r--internal/net/server.go19
1 files changed, 19 insertions, 0 deletions
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()