Add DEBUG-gated panel to buy any card in the shop

When the server's DEBUG env var is on, expose a card catalog endpoint
and a collapsible client panel that drops any pet or food straight into
your deck (free, off-turn). Gated server-side so it is inert in normal
play.
This commit is contained in:
Greyson Parrelli
2026-07-23 01:07:14 -04:00
parent 71fa20493a
commit b2aa7c5ca3
13 changed files with 282 additions and 7 deletions
+3
View File
@@ -35,6 +35,9 @@ type View struct {
Pending *PendingTrade `json:"pending,omitempty"`
Battle *BattleResult `json:"battle,omitempty"`
WinnerSeat int `json:"winnerSeat"`
// Debug is set by the server when its DEBUG flag is on, unlocking the
// client's "buy any card" panel. Not part of the pure game state.
Debug bool `json:"debug,omitempty"`
}
// ViewFor builds the state visible to the given player.