- CheckStyle.

This commit is contained in:
Chris
2012-12-01 21:28:49 +00:00
parent a9a199518d
commit 6ac18eb140
9 changed files with 56 additions and 49 deletions

View File

@@ -169,7 +169,7 @@ public enum FModel {
* Separate thread, no more hangs when network connection is limited * Separate thread, no more hangs when network connection is limited
*/ */
private void testNetworkConnection() { private void testNetworkConnection() {
//
Runnable runNetworkTest = new Runnable() { Runnable runNetworkTest = new Runnable() {
@Override @Override
public void run() { public void run() {

View File

@@ -161,8 +161,9 @@ public class QuestController {
* @return QuestPreconManager * @return QuestPreconManager
*/ */
public static IStorageView<PreconDeck> getPrecons() { public static IStorageView<PreconDeck> getPrecons() {
if ( null == preconManager ) if (null == preconManager) {
preconManager = new StorageView<PreconDeck>(new PreconReader(ForgeProps.getFile(NewConstants.Quest.PRECONS))); preconManager = new StorageView<PreconDeck>(new PreconReader(ForgeProps.getFile(NewConstants.Quest.PRECONS)));
}
return QuestController.preconManager; return QuestController.preconManager;
} }
@@ -223,12 +224,13 @@ public class QuestController {
this.load(new QuestData(name, difficulty, mode, formatPrizes, allowSetUnlocks)); // pass awards and unlocks here this.load(new QuestData(name, difficulty, mode, formatPrizes, allowSetUnlocks)); // pass awards and unlocks here
if ( null != startingCards ) if (null != startingCards) {
this.myCards.addDeck(startingCards); this.myCards.addDeck(startingCards);
else { } else {
Predicate<CardPrinted> filter = Predicates.alwaysTrue(); Predicate<CardPrinted> filter = Predicates.alwaysTrue();
if ( formatStartingPool != null ) if (formatStartingPool != null) {
filter = formatStartingPool.getFilterPrinted(); filter = formatStartingPool.getFilterPrinted();
}
this.myCards.setupNewGameCardPool(filter, difficulty); this.myCards.setupNewGameCardPool(filter, difficulty);
} }

View File

@@ -223,8 +223,8 @@ public class QuestEventChallenge extends QuestEvent {
* @return the card reward list * @return the card reward list
*/ */
public final List<CardPrinted> getCardRewardList() { public final List<CardPrinted> getCardRewardList() {
if ( cardRewardList == null ) if (cardRewardList == null) {
{
this.cardRewardList = BoosterUtils.generateCardRewardList(cardReward); this.cardRewardList = BoosterUtils.generateCardRewardList(cardReward);
} }
return this.cardRewardList.open(); return this.cardRewardList.open();

View File

@@ -78,13 +78,16 @@ public final class QuestUtilCards {
if (usedFormat != null) { if (usedFormat != null) {
List<String> availableEditions = usedFormat.getAllowedSetCodes(); List<String> availableEditions = usedFormat.getAllowedSetCodes();
for (String edition : availableEditions) { for (String edition : availableEditions) {
if (db.isCardSupported("Plains", edition)) if (db.isCardSupported("Plains", edition)) {
landCodes.add(edition); landCodes.add(edition);
} }
if (usedFormat.isSetLegal("ICE")) }
if (usedFormat.isSetLegal("ICE")) {
snowLandCodes.add("ICE"); snowLandCodes.add("ICE");
if (usedFormat.isSetLegal("CSP")) }
if (usedFormat.isSetLegal("CSP")) {
snowLandCodes.add("CSP"); snowLandCodes.add("CSP");
}
} else { } else {
Iterable<CardEdition> allEditions = Singletons.getModel().getEditions(); Iterable<CardEdition> allEditions = Singletons.getModel().getEditions();
for (CardEdition edition : Iterables.filter(allEditions, CardEdition.Predicates.hasBasicLands)) { for (CardEdition edition : Iterables.filter(allEditions, CardEdition.Predicates.hasBasicLands)) {
@@ -95,8 +98,9 @@ public final class QuestUtilCards {
} }
String landCode = Aggregates.random(landCodes); String landCode = Aggregates.random(landCodes);
if ( null == landCode ) if (null == landCode) {
landCode = "M10"; landCode = "M10";
}
pool.add(db.getCard("Forest", landCode), nBasic); pool.add(db.getCard("Forest", landCode), nBasic);
pool.add(db.getCard("Mountain", landCode), nBasic); pool.add(db.getCard("Mountain", landCode), nBasic);

View File

@@ -77,8 +77,9 @@ public final class QuestData {
public QuestData(String name2, int diff, QuestMode mode2, GameFormat userFormat, boolean allowSetUnlocks) { public QuestData(String name2, int diff, QuestMode mode2, GameFormat userFormat, boolean allowSetUnlocks) {
this.name = name2; this.name = name2;
if ( userFormat != null) if (userFormat != null) {
this.format = new GameFormatQuest(userFormat, allowSetUnlocks); this.format = new GameFormatQuest(userFormat, allowSetUnlocks);
}
this.mode = mode2; this.mode = mode2;
this.achievements = new QuestAchievements(diff); this.achievements = new QuestAchievements(diff);
this.assets = new QuestAssets(format); this.assets = new QuestAssets(format);

View File

@@ -229,7 +229,7 @@ public class QuestPreferences implements Serializable {
List<String> lines = FileUtil.readFile(ForgeProps.getFile(Quest.PREFS)); List<String> lines = FileUtil.readFile(ForgeProps.getFile(Quest.PREFS));
for (String line : lines ) { for (String line : lines) {
if (line.startsWith("#") || (line.length() == 0)) { if (line.startsWith("#") || (line.length() == 0)) {
continue; continue;
} }