aboutsummaryrefslogtreecommitdiff
path: root/internal/game/game.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 06:03:49 -0400
committerhistoria <[not public]>2026-10-05 06:03:49 -0400
commitc84a9944356f590d90d819d652bdf1349ebacd40 (patch)
treeaf1ee15992e141fb3eb6f26cac02cf06306d4982 /internal/game/game.go
parent8b78aa4cd930fde145959704ba7bdc0e57465b9b (diff)
downloadthehouseoficarus-c84a9944356f590d90d819d652bdf1349ebacd40.tar.gz
feat: prediction exchange with live polymarket data
Diffstat (limited to 'internal/game/game.go')
-rw-r--r--internal/game/game.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/game/game.go b/internal/game/game.go
index 521c892..1ce89e5 100644
--- a/internal/game/game.go
+++ b/internal/game/game.go
@@ -21,6 +21,7 @@ import (
"thehouseoficarus/internal/net"
"thehouseoficarus/internal/object"
"thehouseoficarus/internal/player"
+ "thehouseoficarus/internal/prediction"
"thehouseoficarus/internal/world"
)
@@ -60,6 +61,7 @@ type Game struct {
Hub *net.Hub
GlobalFlags *GlobalFlagStore
Combat *combat.Tracker
+ PredictionClient *prediction.Client
Casino *casino.Manager
flagIndex *flagTriggerIndex
queue *CommandQueue
@@ -629,6 +631,13 @@ func (g *Game) handleGameCommand(sess *net.Session, input string) {
}
cmd := parts[0]
+ // Counter commands exist only while using the counter, before global prefixes.
+ if g.predictionInputOwned(sess, cmd) {
+ g.executeCommand(sess, cmd, parts[1:], input)
+ g.writePrompt(sess)
+ return
+ }
+
// Seated casino players may shorten any of their game's verbs to an
// unambiguous prefix (b 1000 -> bet 1000, sp -> spin at Big 6). Only the
// current game's vocabulary is considered, and exact commands still win, so