rename of carddb.getAllUniqueCards method => getUniqueCards

This commit is contained in:
Maxmtg
2013-02-16 07:12:08 +00:00
parent 0dd5394dbd
commit 9ddcab70fd
11 changed files with 15 additions and 11 deletions

1
.gitattributes vendored
View File

@@ -14301,6 +14301,7 @@ src/main/java/forge/model/BuildInfo.java -text
src/main/java/forge/model/FModel.java svneol=native#text/plain src/main/java/forge/model/FModel.java svneol=native#text/plain
src/main/java/forge/model/MultipleForgeJarsFoundError.java -text src/main/java/forge/model/MultipleForgeJarsFoundError.java -text
src/main/java/forge/model/package-info.java svneol=native#text/plain src/main/java/forge/model/package-info.java svneol=native#text/plain
src/main/java/forge/net/package-info.java -text
src/main/java/forge/package-info.java svneol=native#text/plain src/main/java/forge/package-info.java svneol=native#text/plain
src/main/java/forge/properties/ForgePreferences.java svneol=native#text/plain src/main/java/forge/properties/ForgePreferences.java svneol=native#text/plain
src/main/java/forge/properties/ForgeProps.java svneol=native#text/plain src/main/java/forge/properties/ForgeProps.java svneol=native#text/plain

View File

@@ -218,7 +218,7 @@ public class MetaSet {
return new UnOpenedProduct(fnPick, bpCustom); return new UnOpenedProduct(fnPick, bpCustom);
} }
else if ("full".equalsIgnoreCase(type)) { else if ("full".equalsIgnoreCase(type)) {
final BoosterGenerator bpFull = new BoosterGenerator(CardDb.instance().getAllUniqueCards()); final BoosterGenerator bpFull = new BoosterGenerator(CardDb.instance().getUniqueCards());
return new UnOpenedProduct(BoosterGenerator.IDENTITY_PICK, bpFull); return new UnOpenedProduct(BoosterGenerator.IDENTITY_PICK, bpFull);
} }
else if ("meta".equalsIgnoreCase(type)) { else if ("meta".equalsIgnoreCase(type)) {
@@ -276,7 +276,7 @@ public class MetaSet {
System.out.println("WARNING - MetaSet type '" + typeTest[0] + "' ignored in pool creation."); System.out.println("WARNING - MetaSet type '" + typeTest[0] + "' ignored in pool creation.");
} }
else if (typeTest[0].equalsIgnoreCase("full")) { else if (typeTest[0].equalsIgnoreCase("full")) {
for (CardPrinted aCard : CardDb.instance().getAllUniqueCards()) { for (CardPrinted aCard : CardDb.instance().getUniqueCards()) {
cardPool.add(aCard); cardPool.add(aCard);
} }
return cardPool; return cardPool;

View File

@@ -61,7 +61,7 @@ public class ChooseCardNameEffect extends SpellEffect {
final String message = validDesc.equals("card") ? "Name a card" : "Name a " + validDesc + " card."; final String message = validDesc.equals("card") ? "Name a card" : "Name a " + validDesc + " card.";
List<CardPrinted> cards = Lists.newArrayList(CardDb.instance().getAllUniqueCards()); List<CardPrinted> cards = Lists.newArrayList(CardDb.instance().getUniqueCards());
if ( StringUtils.containsIgnoreCase(valid, "nonland") ) if ( StringUtils.containsIgnoreCase(valid, "nonland") )
{ {
Predicate<CardPrinted> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_NON_LAND, CardPrinted.FN_GET_RULES); Predicate<CardPrinted> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_NON_LAND, CardPrinted.FN_GET_RULES);

View File

@@ -83,7 +83,7 @@ public final class BoosterDraft implements IBoosterDraft {
switch (draftType) { switch (draftType) {
case Full: // Draft from all cards in Forge case Full: // Draft from all cards in Forge
final BoosterGenerator bpFull = new BoosterGenerator(CardDb.instance().getAllUniqueCards()); final BoosterGenerator bpFull = new BoosterGenerator(CardDb.instance().getUniqueCards());
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
this.product.add(new UnOpenedProduct(BoosterGenerator.IDENTITY_PICK, bpFull)); this.product.add(new UnOpenedProduct(BoosterGenerator.IDENTITY_PICK, bpFull));
} }

View File

@@ -110,7 +110,7 @@ public class CustomLimited extends DeckBase {
final String deckName = data.get("DeckFile"); final String deckName = data.get("DeckFile");
final Deck deckCube = cubes.get(deckName); final Deck deckCube = cubes.get(deckName);
cd.cardPool = deckCube == null ? ItemPool.createFrom( cd.cardPool = deckCube == null ? ItemPool.createFrom(
CardDb.instance().getAllUniqueCards(), CardPrinted.class) CardDb.instance().getUniqueCards(), CardPrinted.class)
: deckCube.getMain(); : deckCube.getMain();
return cd; return cd;

View File

@@ -66,7 +66,7 @@ public class SealedDeckFormat {
if (sealedType.equals("Full")) { if (sealedType.equals("Full")) {
final BoosterGenerator bpFull = new BoosterGenerator(CardDb.instance().getAllUniqueCards()); final BoosterGenerator bpFull = new BoosterGenerator(CardDb.instance().getUniqueCards());
// Choose number of boosters // Choose number of boosters
final Integer[] integers = new Integer[10]; final Integer[] integers = new Integer[10];

View File

@@ -757,7 +757,7 @@ public final class GuiDisplayUtil {
return; return;
} }
final List<CardPrinted> cards = Lists.newArrayList(CardDb.instance().getAllUniqueCards()); final List<CardPrinted> cards = Lists.newArrayList(CardDb.instance().getUniqueCards());
Collections.sort(cards); Collections.sort(cards);
// use standard forge's list selection dialog // use standard forge's list selection dialog
@@ -778,7 +778,7 @@ public final class GuiDisplayUtil {
return; return;
} }
final List<CardPrinted> cards = Lists.newArrayList(CardDb.instance().getAllUniqueCards()); final List<CardPrinted> cards = Lists.newArrayList(CardDb.instance().getUniqueCards());
Collections.sort(cards); Collections.sort(cards);
// use standard forge's list selection dialog // use standard forge's list selection dialog

View File

@@ -81,7 +81,7 @@ public enum CDeckgen implements ICDoc {
final Deck randomDeck = new Deck(); final Deck randomDeck = new Deck();
Predicate<CardPrinted> notBasicLand = Predicates.not(Predicates.compose(CardRulesPredicates.Presets.IS_BASIC_LAND, CardPrinted.FN_GET_RULES)); Predicate<CardPrinted> notBasicLand = Predicates.not(Predicates.compose(CardRulesPredicates.Presets.IS_BASIC_LAND, CardPrinted.FN_GET_RULES));
Iterable<CardPrinted> source = Iterables.filter(CardDb.instance().getAllUniqueCards(), notBasicLand); Iterable<CardPrinted> source = Iterables.filter(CardDb.instance().getUniqueCards(), notBasicLand);
randomDeck.getMain().addAllFlat(Aggregates.random(source, 15 * 5)); randomDeck.getMain().addAllFlat(Aggregates.random(source, 15 * 5));
randomDeck.getMain().add("Plains"); randomDeck.getMain().add("Plains");

View File

@@ -62,7 +62,7 @@ public class GuiDownloadPicturesLQ extends GuiDownloader {
baseFolder = ForgeProps.getFile(NewConstants.IMAGE_BASE).getPath(); baseFolder = ForgeProps.getFile(NewConstants.IMAGE_BASE).getPath();
downloads = new ArrayList<DownloadObject>(); downloads = new ArrayList<DownloadObject>();
for (final CardPrinted c : CardDb.instance().getAllUniqueCards()) { for (final CardPrinted c : CardDb.instance().getUniqueCards()) {
//System.out.println(c.getName()); //System.out.println(c.getName());
CardRules firstSide = c.getCard(); CardRules firstSide = c.getCard();
this.createDLObjects(firstSide); this.createDLObjects(firstSide);

View File

@@ -273,7 +273,7 @@ public final class CardDb {
* *
* @return the all unique cards * @return the all unique cards
*/ */
public Collection<CardPrinted> getAllUniqueCards() { public Collection<CardPrinted> getUniqueCards() {
return this.uniqueCards.values(); return this.uniqueCards.values();
} }

View File

@@ -0,0 +1,3 @@
/** Model (as in model-view-controller) for Forge. */
package forge.net;