Add support for up to 6 players.
This commit is contained in:
@@ -96,7 +96,7 @@ func forceBattle(t *testing.T, g *Game, d1, d2 []Card) *BattleResult {
|
||||
if g.Phase != PhaseBattle {
|
||||
t.Fatalf("expected battle phase, got %s", g.Phase)
|
||||
}
|
||||
return g.Battle
|
||||
return g.Battles[0]
|
||||
}
|
||||
|
||||
func eventsOfType(res *BattleResult, typ string) []BattleEvent {
|
||||
@@ -712,8 +712,8 @@ func TestPriorityTokenTransfer(t *testing.T) {
|
||||
g, _, _ := testGame(t)
|
||||
g.PrioritySeat = 0
|
||||
forceBattle(t, g, []Card{g.pet("Champ", 9)}, []Card{g.pet("Chump", 1)})
|
||||
if g.Battle.WinnerSeat != 0 {
|
||||
t.Fatalf("seat 0 should win, got %d", g.Battle.WinnerSeat)
|
||||
if g.Battles[0].WinnerSeat != 0 {
|
||||
t.Fatalf("seat 0 should win, got %d", g.Battles[0].WinnerSeat)
|
||||
}
|
||||
if g.PrioritySeat != 1 {
|
||||
t.Fatalf("winner should hand the token to the loser, priority=%d", g.PrioritySeat)
|
||||
@@ -723,8 +723,8 @@ func TestPriorityTokenTransfer(t *testing.T) {
|
||||
g, _, _ = testGame(t)
|
||||
g.PrioritySeat = 1
|
||||
forceBattle(t, g, []Card{g.pet("Champ", 9)}, []Card{g.pet("Chump", 1)})
|
||||
if g.Battle.WinnerSeat != 0 {
|
||||
t.Fatalf("seat 0 should win, got %d", g.Battle.WinnerSeat)
|
||||
if g.Battles[0].WinnerSeat != 0 {
|
||||
t.Fatalf("seat 0 should win, got %d", g.Battles[0].WinnerSeat)
|
||||
}
|
||||
if g.PrioritySeat != 1 {
|
||||
t.Fatalf("a losing token holder should keep it, priority=%d", g.PrioritySeat)
|
||||
@@ -734,8 +734,8 @@ func TestPriorityTokenTransfer(t *testing.T) {
|
||||
g, _, _ = testGame(t)
|
||||
g.PrioritySeat = 0
|
||||
forceBattle(t, g, []Card{g.pet("A", 3)}, []Card{g.pet("B", 3)})
|
||||
if g.Battle.WinnerSeat != -1 {
|
||||
t.Fatalf("mutual KO should draw, got %d", g.Battle.WinnerSeat)
|
||||
if g.Battles[0].WinnerSeat != -1 {
|
||||
t.Fatalf("mutual KO should draw, got %d", g.Battles[0].WinnerSeat)
|
||||
}
|
||||
if g.PrioritySeat != 0 {
|
||||
t.Fatalf("a draw should leave the token put, priority=%d", g.PrioritySeat)
|
||||
|
||||
Reference in New Issue
Block a user