Add support for up to 6 players.

This commit is contained in:
Greyson Parrelli
2026-07-28 07:36:09 -04:00
parent e542118175
commit a4f5f6910d
38 changed files with 2306 additions and 713 deletions
+7 -7
View File
@@ -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)