mirror of
https://github.com/magefree/mage.git
synced 2026-01-19 01:39:58 -08:00
Make color distribution in booster more uniform
This commit is contained in:
parent
d6702ea1de
commit
79120e7484
4 changed files with 95 additions and 13 deletions
|
|
@ -9,10 +9,8 @@ import mage.cards.repository.CardInfo;
|
|||
import mage.cards.repository.CardScanner;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.sets.CoreSet2019;
|
||||
import mage.sets.FateReforged;
|
||||
import mage.sets.MastersEditionII;
|
||||
import mage.sets.MastersEditionIV;
|
||||
import mage.sets.*;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
|
@ -115,6 +113,15 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
assertTrue(allCards.stream().anyMatch(card -> card.getCardType().contains(CardType.LAND) && card.getRarity().equals(Rarity.COMMON)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDominaria_EveryBoosterContainsLegendaryCreature() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
List<Card> booster = Dominaria.getInstance().createBooster();
|
||||
// check that booster contains legendary creature
|
||||
assertTrue(booster.stream().anyMatch(card -> card.isCreature() && card.isLegendary()));
|
||||
}
|
||||
}
|
||||
|
||||
private static String str(List<Card> cards) {
|
||||
StringBuilder sb = new StringBuilder("[");
|
||||
Iterator<Card> iterator = cards.iterator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue