mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -424,7 +424,7 @@ public final class TableModel<T extends InventoryItem> extends AbstractTableMode
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public int compare(Entry<T, Integer> o1, Entry<T, Integer> o2) {
|
public int compare(Entry<T, Integer> o1, Entry<T, Integer> o2) {
|
||||||
return sorter.compare((Entry<InventoryItem, Integer>)o1, (Entry<InventoryItem, Integer>)o2);
|
return sorter.compare((Entry<InventoryItem, Integer>) o1, (Entry<InventoryItem, Integer>) o2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ public final class TableView<T extends InventoryItem> {
|
|||||||
/** The want unique. */
|
/** The want unique. */
|
||||||
private boolean wantUnique = false;
|
private boolean wantUnique = false;
|
||||||
|
|
||||||
|
|
||||||
private final Class<T> genericType;
|
private final Class<T> genericType;
|
||||||
|
|
||||||
// need this to allow users place its contents
|
// need this to allow users place its contents
|
||||||
@@ -277,7 +276,6 @@ public final class TableView<T extends InventoryItem> {
|
|||||||
this.setDeckImpl(pool);
|
this.setDeckImpl(pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* setDeckImpl.
|
* setDeckImpl.
|
||||||
|
|||||||
@@ -88,8 +88,9 @@ public class PreconDeck implements InventoryItemFromSet {
|
|||||||
|
|
||||||
imageFilename = kv.get("Image");
|
imageFilename = kv.get("Image");
|
||||||
description = kv.get("Description");
|
description = kv.get("Description");
|
||||||
if( AllZone.getEditions().getEditionByCode(kv.get("set").toUpperCase()) != null )
|
if (AllZone.getEditions().getEditionByCode(kv.get("set").toUpperCase()) != null) {
|
||||||
{ setProxy = kv.get("set"); }
|
setProxy = kv.get("set");
|
||||||
|
}
|
||||||
|
|
||||||
this.set = setProxy;
|
this.set = setProxy;
|
||||||
this.recommendedDeals = new SellRules(sections.get("shop"));
|
this.recommendedDeals = new SellRules(sections.get("shop"));
|
||||||
|
|||||||
@@ -310,12 +310,13 @@ public enum FModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all player's decks for constructed, sealed and whatever
|
* Returns all player's decks for constructed, sealed and whatever.
|
||||||
* @return {@link forge.decks.CardCollections}
|
* @return {@link forge.decks.CardCollections}
|
||||||
*/
|
*/
|
||||||
public final CardCollections getDecks() {
|
public final CardCollections getDecks() {
|
||||||
if (decks == null)
|
if (decks == null) {
|
||||||
this.decks = new CardCollections(ForgeProps.getFile(NewConstants.NEW_DECKS));
|
this.decks = new CardCollections(ForgeProps.getFile(NewConstants.NEW_DECKS));
|
||||||
|
}
|
||||||
return decks;
|
return decks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,8 @@ public final class QuestData {
|
|||||||
this.setName(s0);
|
this.setName(s0);
|
||||||
|
|
||||||
QuestPreferences prefs = Singletons.getModel().getQuestPreferences();
|
QuestPreferences prefs = Singletons.getModel().getQuestPreferences();
|
||||||
ItemPoolView<CardPrinted> lands = QuestUtilCards.generateBasicLands( prefs.getPreferenceInt(QPref.STARTING_BASIC_LANDS), prefs.getPreferenceInt(QPref.STARTING_BASIC_LANDS) );
|
ItemPoolView<CardPrinted> lands = QuestUtilCards.generateBasicLands(prefs.getPreferenceInt(QPref.STARTING_BASIC_LANDS),
|
||||||
|
prefs.getPreferenceInt(QPref.STARTING_BASIC_LANDS));
|
||||||
this.getCardPool().addAll(lands);
|
this.getCardPool().addAll(lands);
|
||||||
this.randomizeOpponents();
|
this.randomizeOpponents();
|
||||||
}
|
}
|
||||||
@@ -211,7 +212,6 @@ public final class QuestData {
|
|||||||
this.myCards = new QuestUtilCards(this);
|
this.myCards = new QuestUtilCards(this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// to avoid NPE some pools will be created here if they are null
|
// to avoid NPE some pools will be created here if they are null
|
||||||
if (null == this.getNewCardList()) {
|
if (null == this.getNewCardList()) {
|
||||||
this.setNewCardList(new ItemPool<InventoryItem>(InventoryItem.class));
|
this.setNewCardList(new ItemPool<InventoryItem>(InventoryItem.class));
|
||||||
|
|||||||
@@ -14,12 +14,11 @@ import forge.util.IFolderMap;
|
|||||||
*/
|
*/
|
||||||
public class QuestDeckMap implements IFolderMap<Deck> {
|
public class QuestDeckMap implements IFolderMap<Deck> {
|
||||||
|
|
||||||
|
|
||||||
public QuestDeckMap() {
|
public QuestDeckMap() {
|
||||||
map = new HashMap<String,Deck>();
|
map = new HashMap<String, Deck>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public QuestDeckMap(Map<String,Deck> inMap) {
|
public QuestDeckMap(Map<String, Deck> inMap) {
|
||||||
map = inMap;
|
map = inMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public abstract class StorageReaderFolder<T extends IHasName> implements IItemRe
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the object from file
|
* Read the object from file.
|
||||||
* @param file
|
* @param file
|
||||||
* @return the object deserialized by inherited class
|
* @return the object deserialized by inherited class
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ public class QuestWinLoseHandler extends ControlWinLose {
|
|||||||
*/
|
*/
|
||||||
private void awardBooster() {
|
private void awardBooster() {
|
||||||
final GameFormat[] emptyFormatArray = {};
|
final GameFormat[] emptyFormatArray = {};
|
||||||
final GameFormat[] formats = AllZone.getFormats().getFormats().toArray(emptyFormatArray) ;
|
final GameFormat[] formats = AllZone.getFormats().getFormats().toArray(emptyFormatArray);
|
||||||
final ListChooser<GameFormat> ch = new ListChooser<GameFormat>("Choose bonus booster format", 1, formats);
|
final ListChooser<GameFormat> ch = new ListChooser<GameFormat>("Choose bonus booster format", 1, formats);
|
||||||
|
|
||||||
String prefferedFormat = Singletons.getModel().getQuestPreferences().getPreference(QPref.BOOSTER_FORMAT);
|
String prefferedFormat = Singletons.getModel().getQuestPreferences().getPreference(QPref.BOOSTER_FORMAT);
|
||||||
|
|||||||
Reference in New Issue
Block a user