checkstyle

This commit is contained in:
jendave
2011-10-26 22:26:01 +00:00
parent 94428a8275
commit c83b82f063
7 changed files with 250 additions and 165 deletions

View File

@@ -130,6 +130,10 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
*
* @see forge.IPlayerZone#contains(forge.Card)
*/
/**
* @return boolean
* @param c Card
*/
public final boolean contains(final Card c) {
return cards.contains(c);
}
@@ -359,7 +363,8 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
* equals
* (
* 'Any')
*/) {
*/)
{
ret.add(cardsAddedThisTurn.get(i));
}
}

View File

@@ -638,8 +638,9 @@ public abstract class Player extends GameEntity {
if (AllZoneUtil.isCardInPlay("Benevolent Unicorn") && source.isSpell()) {
int amount = AllZoneUtil.getCardsIn(Zone.Battlefield, "Benevolent Unicorn").size();
for (int i = 0; i < amount; i++) {
if (restDamage > 0)
if (restDamage > 0) {
restDamage -= 1;
}
}
}
@@ -2141,8 +2142,9 @@ public abstract class Player extends GameEntity {
final String excR = incR[1];
String[] exR = excR.split("\\+"); // Exclusive Restrictions are ...
for (int j = 0; j < exR.length; j++) {
if (hasProperty(exR[j], sourceController, source) == false)
if (hasProperty(exR[j], sourceController, source) == false) {
return false;
}
}
}

View File

@@ -193,8 +193,8 @@ public class AbilityFactory_Attach {
* the mandatory
* @return true, if successful
*/
public static boolean attachPreference(final AbilityFactory af, final SpellAbility sa, final Map<String, String> params, final Target tgt,
final boolean mandatory) {
public static boolean attachPreference(final AbilityFactory af, final SpellAbility sa,
final Map<String, String> params, final Target tgt, final boolean mandatory) {
Object o;
if (tgt.canTgtPlayer()) {
o = attachToPlayerAIPreferences(af, sa, mandatory);
@@ -223,8 +223,8 @@ public class AbilityFactory_Attach {
* the mandatory
* @return the card
*/
public static Card attachToCardAIPreferences(final AbilityFactory af, final SpellAbility sa, final Map<String, String> params,
final boolean mandatory) {
public static Card attachToCardAIPreferences(final AbilityFactory af, final SpellAbility sa,
final Map<String, String> params, final boolean mandatory) {
Target tgt = sa.getTarget();
Card attachSource = sa.getSourceCard();
// TODO AttachSource is currently set for the Source of the Spell, but
@@ -272,8 +272,8 @@ public class AbilityFactory_Attach {
* the logic
* @return the card
*/
public static Card attachGeneralAI(final SpellAbility sa, final CardList list, final boolean mandatory, final Card attachSource,
final String logic) {
public static Card attachGeneralAI(final SpellAbility sa, final CardList list, final boolean mandatory,
final Card attachSource, final String logic) {
Player prefPlayer = "Pump".equals(logic) ? AllZone.getComputerPlayer() : AllZone.getHumanPlayer();
// Some ChangeType cards are beneficial, and PrefPlayer should be
// changed to represent that
@@ -411,7 +411,8 @@ public class AbilityFactory_Attach {
* the attach source
* @return the card
*/
public static Card attachAIPumpPreference(final SpellAbility sa, final CardList list, final boolean mandatory, final Card attachSource) {
public static Card attachAIPumpPreference(final SpellAbility sa, final CardList list, final boolean mandatory,
final Card attachSource) {
// AI For choosing a Card to Pump
Card c = null;
CardList magnetList = null;
@@ -707,8 +708,8 @@ public class AbilityFactory_Attach {
* the attach source
* @return the card
*/
public static Card attachAIKeepTappedPreference(final SpellAbility sa, final CardList list, final boolean mandatory,
final Card attachSource) {
public static Card attachAIKeepTappedPreference(final SpellAbility sa, final CardList list,
final boolean mandatory, final Card attachSource) {
// AI For Cards like Paralyzing Grasp and Glimmerdust Nap
CardList prefList = list.filter(new CardListFilter() {
@Override
@@ -761,7 +762,8 @@ public class AbilityFactory_Attach {
* the mandatory
* @return the player
*/
public static Player attachToPlayerAIPreferences(final AbilityFactory af, final SpellAbility sa, final boolean mandatory) {
public static Player attachToPlayerAIPreferences(final AbilityFactory af, final SpellAbility sa,
final boolean mandatory) {
Target tgt = sa.getTarget();
Player p;
if (tgt.canOnlyTgtOpponent()) {
@@ -935,11 +937,10 @@ public class AbilityFactory_Attach {
// handle being scripted
boolean gainControl = "GainControl".equals(af.getMapParams().get("AILogic"));
handleAura(card, c, gainControl);
} else if (card.isEquipment())
{
} else if (card.isEquipment()) {
card.equipCard(c);
// else if (card.isFortification())
// card.fortifyCard(c);
// else if (card.isFortification())
// card.fortifyCard(c);
}
} else if (o instanceof Player) {
// Currently, a few cards can enchant players

View File

@@ -210,8 +210,9 @@ public class CardFactory_Instants {
Pile1.add(Random);
}
for (int i = 0; i < Count; i++) {
if (!Pile1.contains(library.get(i)))
if (!Pile1.contains(library.get(i))) {
Pile2.add(library.get(i));
}
}
StringBuilder sb = new StringBuilder();
sb.append("Choose a pile to add to your hand: " + "\r\n" + "\r\n");

View File

@@ -928,7 +928,6 @@ public class CardFactory_Planeswalkers {
// TODO: improve this:
if (land.size() > 4 && c.isLand()) {
;
} else {
AllZone.getGameAction().moveToBottomOfLibrary(c);
}

View File

@@ -564,7 +564,7 @@ public class Gui_HomeScreen {
cmdDeckSelect.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));
cmdDeckSelect.setBackground(new Color(255, 222, 173));
cmdDeckSelect.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
public void actionPerformed(final ActionEvent e) {
doDeckSelect();
}
});