Initial pass at unicorn pack.
This commit is contained in:
@@ -102,6 +102,8 @@ func applyAction(g *game.Game, playerID string, a *Action) error {
|
||||
return g.TradeChoose(playerID, a.Pick)
|
||||
case "revealChoose":
|
||||
return g.RevealChoose(playerID, a.CardID)
|
||||
case "sacrificeChoose":
|
||||
return g.SacrificeChoose(playerID, a.CardID)
|
||||
case "pass":
|
||||
return g.Pass(playerID)
|
||||
case "arrange":
|
||||
@@ -139,6 +141,20 @@ func TestBotsFinishGoldenGame(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestBotsFinishUnicornGame plays complete games on the Unicorn pack (tiers
|
||||
// 1-3 printed; 4-6 still in progress, so late shops are barren but battles
|
||||
// still resolve). It exercises the Mana and Ailment mechanics via
|
||||
// SimulateBattle rollouts plus the new shop effects (Water of Youth's sacrifice
|
||||
// choice, Bigfoot), and fails on any illegal or missing bot action.
|
||||
func TestBotsFinishUnicornGame(t *testing.T) {
|
||||
for range 5 {
|
||||
g := playBotGamePack(t, "unicorn", 1, 0.6)
|
||||
if g.Round != game.MaxRounds {
|
||||
t.Errorf("unicorn game ended on round %d, want %d", g.Round, game.MaxRounds)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestObserveTracksOpponentDeck checks the memory's opponent model against
|
||||
// the opponent's real deck after known public actions. The model may only
|
||||
// contain information a human spectator would have.
|
||||
|
||||
Reference in New Issue
Block a user