mirror of
https://github.com/correl/mage.git
synced 2025-04-12 09:11:05 -09:00
Fixed Arrays.asList code
This commit is contained in:
parent
a6f851dc33
commit
d25bca748d
6 changed files with 20 additions and 19 deletions
Mage.Sets/src/mage/cards/c
Mage.Tests/src/test/java/org/mage/test
serverside
sets
utils
Mage/src/main/java/mage/cards/decks
|
@ -12,6 +12,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
@ -28,7 +29,7 @@ public final class CryptOfTheEternals extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {1}, {T}: Add {U}, {B}, or {R}.
|
||||
List<Mana> list = Arrays.asList(Mana.BlueMana(1), Mana.BlackMana(1), Mana.RedMana(1));
|
||||
List<Mana> list = new ArrayList<>(Arrays.asList(Mana.BlueMana(1), Mana.BlackMana(1), Mana.RedMana(1)));
|
||||
|
||||
|
||||
for (Mana m : list) {
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.Locale;
|
|||
*/
|
||||
public class PlayGameTest extends MageTestBase {
|
||||
|
||||
private final static List<String> colorChoices = Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu");
|
||||
private final static List<String> colorChoices = new ArrayList<>(Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu"));
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.Locale;
|
|||
*/
|
||||
public class TestPlayRandomGame extends MageTestBase {
|
||||
|
||||
private final static List<String> colorChoices = Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu");
|
||||
private final static List<String> colorChoices = new ArrayList<>(Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu"));
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
|
|
|
@ -33,7 +33,7 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
CardScanner.scan();
|
||||
}
|
||||
|
||||
private static final List<String> basics = Arrays.asList("Plains", "Island", "Swamp", "Mountain", "Forest");
|
||||
private static final List<String> basics = new ArrayList<>(Arrays.asList("Plains", "Island", "Swamp", "Mountain", "Forest"));
|
||||
|
||||
private void checkOnePartnerBoost() {
|
||||
List<Card> booster = Battlebond.getInstance().createBooster();
|
||||
|
@ -64,11 +64,11 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
@Test
|
||||
public void testFateReforged() {
|
||||
|
||||
List<String> tapland = Arrays.asList(
|
||||
List<String> tapland = new ArrayList<>(Arrays.asList(
|
||||
"Bloodfell Caves", "Blossoming Sands", "Dismal Backwater", "Jungle Hollow", "Rugged Highlands",
|
||||
"Scoured Barrens", "Swiftwater Cliffs", "Thornwood Falls", "Tranquil Cove", "Wind-Scarred Crag");
|
||||
List<String> fetchland = Arrays.asList(
|
||||
"Bloodstained Mire", "Flooded Strand", "Polluted Delta", "Windswept Heath", "Wooded Foothills");
|
||||
"Scoured Barrens", "Swiftwater Cliffs", "Thornwood Falls", "Tranquil Cove", "Wind-Scarred Crag"));
|
||||
List<String> fetchland = new ArrayList<>(Arrays.asList(
|
||||
"Bloodstained Mire", "Flooded Strand", "Polluted Delta", "Windswept Heath", "Wooded Foothills"));
|
||||
|
||||
List<Card> booster = FateReforged.getInstance().createBooster();
|
||||
assertTrue(str(booster), contains(booster, tapland, "FRF") || contains(booster, fetchland, "KTK")
|
||||
|
@ -78,13 +78,13 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
|
||||
@Test
|
||||
public void testMastersEditionII() {
|
||||
List<String> snowCoveredLand = Arrays.asList(
|
||||
List<String> snowCoveredLand = new ArrayList<>(Arrays.asList(
|
||||
"Snow-Covered Plains",
|
||||
"Snow-Covered Island",
|
||||
"Snow-Covered Swamp",
|
||||
"Snow-Covered Mountain",
|
||||
"Snow-Covered Forest"
|
||||
);
|
||||
));
|
||||
List<Card> booster = MastersEditionII.getInstance().createBooster();
|
||||
assertTrue(str(booster), contains(booster, snowCoveredLand, "ME2"));
|
||||
assertFalse(str(booster), contains(booster, basics, null));
|
||||
|
@ -93,11 +93,11 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
@Test
|
||||
public void testMastersEditionIV_UrzaSpecialLandsList() {
|
||||
|
||||
List<String> needUrzaList = Arrays.asList(
|
||||
List<String> needUrzaList = new ArrayList<>(Arrays.asList(
|
||||
"Urza's Mine",
|
||||
"Urza's Power Plant",
|
||||
"Urza's Tower"
|
||||
);
|
||||
));
|
||||
|
||||
List<CardInfo> setOrzaList = MastersEditionIV.getInstance().getSpecialLand();
|
||||
Assert.assertEquals("Urza special lands must have 4 variation for each of 3 card", 3 * 4, setOrzaList.size());
|
||||
|
@ -117,11 +117,11 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
public void testMastersEditionIV_UrzaSpecialLandInBoosters() {
|
||||
// ME4 replace all basic lands with special (1 per booster)
|
||||
// https://mtg.gamepedia.com/Masters_Edition_IV
|
||||
List<String> urzaLand = Arrays.asList(
|
||||
List<String> urzaLand = new ArrayList<>(Arrays.asList(
|
||||
"Urza's Mine",
|
||||
"Urza's Power Plant",
|
||||
"Urza's Tower"
|
||||
);
|
||||
));
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
List<Card> booster = MastersEditionIV.getInstance().createBooster();
|
||||
|
|
|
@ -28,7 +28,7 @@ public class DeckBuilderTest {
|
|||
public void testAllArtifacts() {
|
||||
final List<Card> spellCardPool = new ArrayList<>();
|
||||
final UUID owner = UUID.randomUUID();
|
||||
final List<ColoredManaSymbol> allowedColors = Arrays.asList(ColoredManaSymbol.U);
|
||||
final List<ColoredManaSymbol> allowedColors = new ArrayList<>(Arrays.asList(ColoredManaSymbol.U));
|
||||
final List<String> setsToUse = new ArrayList<>();
|
||||
final List<Card> landCardPool = null;
|
||||
final RateCallback rateCallback = new RateCallback() {
|
||||
|
|
|
@ -17,13 +17,13 @@ public class Constructed extends DeckValidator {
|
|||
|
||||
private static final Logger logger = Logger.getLogger(DeckValidator.class);
|
||||
|
||||
protected static final List<String> anyNumberCardsAllowed = Arrays.asList(
|
||||
protected static final List<String> anyNumberCardsAllowed = new ArrayList<>(Arrays.asList(
|
||||
"Relentless Rats", "Shadowborn Apostle", "Rat Colony", "Persistent Petitioners"
|
||||
);
|
||||
protected static final List<String> basicLandNames = Arrays.asList(
|
||||
));
|
||||
protected static final List<String> basicLandNames = new ArrayList<>(Arrays.asList(
|
||||
"Forest", "Island", "Mountain", "Swamp", "Plains", "Wastes", "Snow-Covered Forest",
|
||||
"Snow-Covered Island", "Snow-Covered Mountain", "Snow-Covered Swamp", "Snow-Covered Plains"
|
||||
);
|
||||
));
|
||||
protected List<String> banned = new ArrayList<>();
|
||||
protected List<String> restricted = new ArrayList<>();
|
||||
protected List<String> setCodes = new ArrayList<>();
|
||||
|
|
Loading…
Add table
Reference in a new issue