Let players peek both decks during and after a battle
Record each seat's arranged lineup on the battle result (already public) and reveal the full deck in a popover when hovering a deck pile in the battle view — the opponent's included.
This commit is contained in:
@@ -696,3 +696,21 @@ func TestPriorityTokenTransfer(t *testing.T) {
|
||||
t.Fatalf("a draw should leave the token put, priority=%d", g.PrioritySeat)
|
||||
}
|
||||
}
|
||||
|
||||
// TestBattleResultExposesLineups: both seats' arranged decks are recorded on
|
||||
// the result so players can peek the whole matchup.
|
||||
func TestBattleResultExposesLineups(t *testing.T) {
|
||||
g, _, _ := testGame(t)
|
||||
res := forceBattle(t, g,
|
||||
[]Card{g.pet("A", 3), g.pet("B", 2)},
|
||||
[]Card{g.pet("C", 4)})
|
||||
if len(res.Lineups) != 2 {
|
||||
t.Fatalf("expected a lineup per seat, got %d", len(res.Lineups))
|
||||
}
|
||||
if len(res.Lineups[0]) != 2 || res.Lineups[0][0].Name != "A" {
|
||||
t.Fatalf("seat 0 lineup should mirror its arranged deck: %+v", res.Lineups[0])
|
||||
}
|
||||
if len(res.Lineups[1]) != 1 || res.Lineups[1][0].Name != "C" {
|
||||
t.Fatalf("seat 1 lineup should mirror its arranged deck: %+v", res.Lineups[1])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user