checkstyle

This commit is contained in:
jendave
2011-12-21 15:52:49 +00:00
parent 3212253e92
commit df4563e22b
7 changed files with 16 additions and 45 deletions

View File

@@ -361,8 +361,6 @@ public class CombatUtil {
*
* @param attacker
* a {@link forge.Card} object.
* @param combat
* a {@link forge.Combat} object.
* @return a boolean.
*/
public static int needsBlockers(final Card attacker) {
@@ -2362,12 +2360,8 @@ public class CombatUtil {
CardList enchantments = c.getController().getCardsIn(Zone.Library);
enchantments = enchantments.filter(new CardListFilter() {
@Override
public boolean addCard(final Card c) {
if (c.isEnchantment() && (c.getCMC() <= 3)) {
return true;
} else {
return false;
}
public boolean addCard(final Card card) {
return (card.isEnchantment() && (card.getCMC() <= 3));
}
});

View File

@@ -485,11 +485,7 @@ public final class GameActionUtil {
answer = JOptionPane.showConfirmDialog(null, question, title.toString(), JOptionPane.YES_NO_OPTION);
}
if (answer == JOptionPane.YES_OPTION) {
return true;
} else {
return false;
}
return answer == JOptionPane.YES_OPTION;
}
/**
@@ -565,11 +561,7 @@ public final class GameActionUtil {
q = GuiUtils.getChoiceOptional("Use " + c + " Landfall?", choices);
if ((q == null) || q.equals("No")) {
return false;
} else {
return true;
}
return (q == null) || q.equals("No");
}
/**

View File

@@ -19,10 +19,11 @@ package forge;
import java.util.HashMap;
//handles "until next untap", "until your next untap" and "at beginning of untap" commands from cards
/**
* <p>
* Untap class.
* Handles "until next untap", "until your next untap" and "at beginning of untap"
* commands from cards.
* </p>
*
* @author Forge

View File

@@ -340,11 +340,7 @@ public class AbilityFactoryDealDamage {
if (source.getName().equals("Stuffy Doll")) {
// Now stuffy sits around for blocking
// TODO(sol): this should also happen if Stuffy is going to die
if (AllZone.getPhase().is(Constant.Phase.END_OF_TURN, AllZone.getHumanPlayer())) {
return true;
} else {
return false;
}
return AllZone.getPhase().is(Constant.Phase.END_OF_TURN, AllZone.getHumanPlayer());
}
if (this.abilityFactory.isAbility()) {

View File

@@ -1026,11 +1026,9 @@ public class CardFactorySorceries {
public boolean addCard(final Card c) {
if (c.getName().contains("Dryad Arbor")) {
return true;
} else if (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|| c.isType("Island") || c.isType("Swamp"))) {
return true;
} else {
return false;
return (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|| c.isType("Island") || c.isType("Swamp")));
}
}
});
@@ -1116,11 +1114,9 @@ public class CardFactorySorceries {
public boolean addCard(final Card c) {
if (c.getName().contains("Dryad Arbor")) {
return true;
} else if (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|| c.isType("Island") || c.isType("Swamp"))) {
return true;
} else {
return false;
return (!(c.isType("Forest") || c.isType("Plains") || c.isType("Mountain")
|| c.isType("Island") || c.isType("Swamp")));
}
}
});
@@ -1451,11 +1447,7 @@ public class CardFactorySorceries {
CardList list = AllZone.getComputerPlayer().getCardsIn(Zone.Hand);
list = list.getType("Land");
if (list.size() > 0) {
return true;
} else {
return false;
}
return list.size() > 0;
}
@Override

View File

@@ -173,7 +173,7 @@ public class MultiPhaseProgressMonitorWithETA extends BaseProgressMonitor {
*
* @param numUnits
* cannot be higher than Integer.MAX_VALUE
* @see net.slightlymagic.braids.util.progress_monitor.ProgressMonitor#setTotalUnitsThisPhase(long)
* @see net.slightlymagic.braids.util.progress_monitor.BraidsProgressMonitor#setTotalUnitsThisPhase(long)
*/
@Override
public final void setTotalUnitsThisPhase(final long numUnits) {
@@ -224,7 +224,7 @@ public class MultiPhaseProgressMonitorWithETA extends BaseProgressMonitor {
*
* @param numUnits
* the num units
* @see net.slightlymagic.braids.util.progress_monitor.ProgressMonitor#incrementUnitsCompletedThisPhase(long)
* @see net.slightlymagic.braids.util.progress_monitor.BraidsProgressMonitor#incrementUnitsCompletedThisPhase(long)
*/
@Override
public final void incrementUnitsCompletedThisPhase(final long numUnits) {

View File

@@ -407,12 +407,8 @@ public class BaseProgressMonitor implements BraidsProgressMonitor {
doctorStartTimes();
long nowTime = (new Date().getTime() / 1000);
if (nowTime - this.lastUIUpdateTime >= this.minUIUpdateIntervalSec
|| (this.getUnitsCompletedSoFarThisPhase() == this.getTotalUnitsThisPhase())) {
return true;
} else {
return false;
}
return (nowTime - this.lastUIUpdateTime >= this.minUIUpdateIntervalSec
|| (this.getUnitsCompletedSoFarThisPhase() == this.getTotalUnitsThisPhase()));
}
/**