mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Checkstyle and Java warnings cleanup in ReadDraftBoosterPack.java
This commit is contained in:
@@ -2,7 +2,6 @@ package forge;
|
|||||||
|
|
||||||
|
|
||||||
import forge.card.CardRules;
|
import forge.card.CardRules;
|
||||||
import forge.card.CardRules.Predicates;
|
|
||||||
import forge.card.CardDb;
|
import forge.card.CardDb;
|
||||||
import forge.card.CardPool;
|
import forge.card.CardPool;
|
||||||
import forge.card.CardPoolView;
|
import forge.card.CardPoolView;
|
||||||
@@ -29,8 +28,8 @@ import net.slightlymagic.maxmtg.Predicate;
|
|||||||
*/
|
*/
|
||||||
public class ReadDraftBoosterPack implements NewConstants {
|
public class ReadDraftBoosterPack implements NewConstants {
|
||||||
|
|
||||||
/** Constant <code>comment="//"</code> */
|
/** Constant <code>comment="//"</code>. */
|
||||||
final private static String comment = "//";
|
private static final String comment = "//";
|
||||||
|
|
||||||
private List<CardPrinted> commonCreatureList = new ArrayList<CardPrinted>();
|
private List<CardPrinted> commonCreatureList = new ArrayList<CardPrinted>();
|
||||||
private List<CardPrinted> commonNonCreatureList = new ArrayList<CardPrinted>();
|
private List<CardPrinted> commonNonCreatureList = new ArrayList<CardPrinted>();
|
||||||
@@ -53,8 +52,9 @@ public class ReadDraftBoosterPack implements NewConstants {
|
|||||||
addBasicLands(list, 20);
|
addBasicLands(list, 20);
|
||||||
addBasicSnowLands(list, 20);
|
addBasicSnowLands(list, 20);
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++) {
|
||||||
list.add(CardDb.instance().getCard("Terramorphic Expanse", "M10"));
|
list.add(CardDb.instance().getCard("Terramorphic Expanse", "M10"));
|
||||||
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
} //getBoosterPack5()
|
} //getBoosterPack5()
|
||||||
@@ -81,7 +81,7 @@ public class ReadDraftBoosterPack implements NewConstants {
|
|||||||
*
|
*
|
||||||
* @return a {@link forge.CardList} object.
|
* @return a {@link forge.CardList} object.
|
||||||
*/
|
*/
|
||||||
public CardPoolView getBoosterPack() {
|
public final CardPoolView getBoosterPack() {
|
||||||
CardPool pack = new CardPool();
|
CardPool pack = new CardPool();
|
||||||
|
|
||||||
pack.add(getRandomCard(rareList));
|
pack.add(getRandomCard(rareList));
|
||||||
@@ -109,7 +109,7 @@ public class ReadDraftBoosterPack implements NewConstants {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//return CardList of 5 or 6 cards, one for each color and maybe an artifact
|
//return CardList of 5 or 6 cards, one for each color and maybe an artifact
|
||||||
private List<CardPrinted> getVariety(List<CardPrinted> in) {
|
private List<CardPrinted> getVariety(final List<CardPrinted> in) {
|
||||||
List<CardPrinted> out = new ArrayList<CardPrinted>();
|
List<CardPrinted> out = new ArrayList<CardPrinted>();
|
||||||
Collections.shuffle(in, MyRandom.random);
|
Collections.shuffle(in, MyRandom.random);
|
||||||
|
|
||||||
@@ -190,5 +190,3 @@ public class ReadDraftBoosterPack implements NewConstants {
|
|||||||
return cardList;
|
return cardList;
|
||||||
} //readFile()
|
} //readFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user