Add lobby and pack concept.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user