Various bug fixes and improvements.

This commit is contained in:
Greyson Parrelli
2026-07-24 10:47:59 -04:00
parent 0fe0757e18
commit 6558806ba0
10 changed files with 66 additions and 27 deletions
+7 -3
View File
@@ -18,9 +18,12 @@ type PlayerView struct {
Avocados int `json:"avocados,omitempty"`
// FirstBuyFree / BuysThisRound (Golden pack) are self-only: they'd reveal
// hidden deck facts (a Manta Ray) to opponents.
FirstBuyFree bool `json:"firstBuyFree,omitempty"`
BuysThisRound int `json:"buysThisRound,omitempty"`
Deck []Card `json:"deck,omitempty"` // self only
FirstBuyFree bool `json:"firstBuyFree,omitempty"`
BuysThisRound int `json:"buysThisRound,omitempty"`
// Trumpets is the count banked for the next battle (Bird of Paradise).
// Self-only — shown under the player's own deck.
Trumpets int `json:"trumpets,omitempty"`
Deck []Card `json:"deck,omitempty"` // self only
}
// View is the full game state as seen by one player.
@@ -105,6 +108,7 @@ func (g *Game) ViewFor(playerID string) View {
pv.Deck = p.Deck
pv.FirstBuyFree = p.FirstBuyFree
pv.BuysThisRound = p.BuysThisRound
pv.Trumpets = p.PendingTrumpets
}
v.Players = append(v.Players, pv)
}