Add lobby and pack concept.

This commit is contained in:
Greyson Parrelli
2026-07-23 22:01:54 -04:00
parent 9d9acc4577
commit e74f983470
18 changed files with 665 additions and 111 deletions
+15 -2
View File
@@ -24,8 +24,16 @@ type View struct {
Round int `json:"round"`
MaxRounds int `json:"maxRounds"`
MaxPets int `json:"maxPets"`
YouSeat int `json:"youSeat"`
Turn int `json:"turn"`
// Pack is the selected card pack; Packs is the catalog of choices for the
// lobby. HostSeat is the seat that controls the lobby (always 0 for now);
// MinPlayers is how many seats must be filled before the host can start.
Pack string `json:"pack"`
Packs []PackInfo `json:"packs"`
HostSeat int `json:"hostSeat"`
MinPlayers int `json:"minPlayers"`
MaxPlayers int `json:"maxPlayers"`
YouSeat int `json:"youSeat"`
Turn int `json:"turn"`
// PrioritySeat is the seat currently holding the priority token.
PrioritySeat int `json:"prioritySeat"`
ShopRow []Card `json:"shopRow"`
@@ -52,6 +60,11 @@ func (g *Game) ViewFor(playerID string) View {
Round: g.Round,
MaxRounds: MaxRounds,
MaxPets: MaxPets,
Pack: g.Pack,
Packs: Packs,
HostSeat: 0,
MinPlayers: MinPlayers,
MaxPlayers: MaxPlayers,
YouSeat: -1,
Turn: g.Turn,
PrioritySeat: g.PrioritySeat,