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
+7 -1
View File
@@ -17,8 +17,11 @@ func testGame(t *testing.T) (*Game, *Player, *Player) {
if err != nil {
t.Fatal(err)
}
if err := g.StartGame(); err != nil {
t.Fatal(err)
}
if g.Phase != PhaseShop {
t.Fatalf("expected shop phase after both players join, got %s", g.Phase)
t.Fatalf("expected shop phase after the game starts, got %s", g.Phase)
}
// Pin the (otherwise random) priority token to seat 0 so tests are
// deterministic: seat 0 shops first and wins battle simultaneity races.
@@ -635,6 +638,9 @@ func TestPriorityTokenInitialAssignment(t *testing.T) {
if _, err := g.AddPlayer("Bob"); err != nil {
t.Fatal(err)
}
if err := g.StartGame(); err != nil {
t.Fatal(err)
}
if g.PrioritySeat < 0 || g.PrioritySeat >= len(g.Players) {
t.Fatalf("priority token should start on a real seat, got %d", g.PrioritySeat)
}