- Checkstyle.

This commit is contained in:
Chris
2011-12-06 13:34:47 +00:00
parent 4f02ba15ec
commit ea77ce2541
4 changed files with 20 additions and 20 deletions

View File

@@ -1986,38 +1986,38 @@ public class CombatUtil {
c.setDamage(0); c.setDamage(0);
} }
} }
/** /**
* gets a string for the GameLog regarding attackers * gets a string for the GameLog regarding attackers.
* *
* @return a String * @return a String
*/ */
public static String getCombatAttackForLog() { public static String getCombatAttackForLog() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
// Loop through Defenders // Loop through Defenders
// Append Defending Player/Planeswalker // Append Defending Player/Planeswalker
final Combat combat = AllZone.getCombat(); final Combat combat = AllZone.getCombat();
final ArrayList<Object> defenders = combat.getDefenders(); final ArrayList<Object> defenders = combat.getDefenders();
final CardList[] attackers = combat.sortAttackerByDefender(); final CardList[] attackers = combat.sortAttackerByDefender();
// Not a big fan of the triple nested loop here // Not a big fan of the triple nested loop here
for (int def = 0; def < defenders.size(); def++) { for (int def = 0; def < defenders.size(); def++) {
if ((attackers[def] == null) || (attackers[def].size() == 0)) { if ((attackers[def] == null) || (attackers[def].size() == 0)) {
continue; continue;
} }
sb.append(combat.getAttackingPlayer()).append(" declared "); sb.append(combat.getAttackingPlayer()).append(" declared ");
for (Card attacker : attackers[def]) { for (Card attacker : attackers[def]) {
sb.append(attacker).append(" "); sb.append(attacker).append(" ");
} }
sb.append("attacking ").append(defenders.get(def).toString()).append("."); sb.append("attacking ").append(defenders.get(def).toString()).append(".");
} }
return sb.toString(); return sb.toString();
} }
/** /**
* gets a string for the GameLog regarding assigned blockers. * gets a string for the GameLog regarding assigned blockers.
* *
@@ -2025,7 +2025,7 @@ public class CombatUtil {
*/ */
public static String getCombatBlockForLog() { public static String getCombatBlockForLog() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
Card[] defend = null; Card[] defend = null;
// Loop through Defenders // Loop through Defenders
@@ -2033,14 +2033,14 @@ public class CombatUtil {
final Combat combat = AllZone.getCombat(); final Combat combat = AllZone.getCombat();
final ArrayList<Object> defenders = combat.getDefenders(); final ArrayList<Object> defenders = combat.getDefenders();
final CardList[] attackers = combat.sortAttackerByDefender(); final CardList[] attackers = combat.sortAttackerByDefender();
// Not a big fan of the triple nested loop here // Not a big fan of the triple nested loop here
for (int def = 0; def < defenders.size(); def++) { for (int def = 0; def < defenders.size(); def++) {
final CardList list = attackers[def]; final CardList list = attackers[def];
for (final Card attacker : list) { for (final Card attacker : list) {
sb.append(combat.getDefendingPlayer()).append(" assigned "); sb.append(combat.getDefendingPlayer()).append(" assigned ");
defend = AllZone.getCombat().getBlockers(attacker).toArray(); defend = AllZone.getCombat().getBlockers(attacker).toArray();
if (defend.length > 0) { if (defend.length > 0) {
@@ -2051,11 +2051,11 @@ public class CombatUtil {
} else { } else {
sb.append("<nothing> "); sb.append("<nothing> ");
} }
sb.append("to block ").append(attacker).append(". "); sb.append("to block ").append(attacker).append(". ");
} // loop through attackers } // loop through attackers
} }
return sb.toString(); return sb.toString();
} }

View File

@@ -1851,7 +1851,7 @@ public class GameAction {
} }
if (c.hasStartOfKeyword("May be played without paying its mana cost")) { if (c.hasStartOfKeyword("May be played without paying its mana cost")) {
final SpellAbility newSA = sa.copy(); final SpellAbility newSA = sa.copy();
final Cost cost = new Cost("",c.getName(),false); final Cost cost = new Cost("", c.getName(), false);
for (CostPart part : newSA.getPayCosts().getCostParts()) { for (CostPart part : newSA.getPayCosts().getCostParts()) {
if (!(part instanceof CostMana)) { if (!(part instanceof CostMana)) {
cost.getCostParts().add(part); cost.getCostParts().add(part);

View File

@@ -588,7 +588,7 @@ public class PhaseUtil {
} }
} }
AllZone.getGameLog().add("Combat", CombatUtil.getCombatAttackForLog(), 1); AllZone.getGameLog().add("Combat", CombatUtil.getCombatAttackForLog(), 1);
final HashMap<String, Object> runParams = new HashMap<String, Object>(); final HashMap<String, Object> runParams = new HashMap<String, Object>();

View File

@@ -303,18 +303,18 @@ public class ViewTabber extends FRoundedPanel {
tar.setOpaque(false); tar.setOpaque(false);
tar.setBorder(border); tar.setBorder(border);
tar.setFont(font); tar.setFont(font);
tar.setForeground(this.skin.getClrText()); tar.setForeground(this.skin.getClrText());
tar.setFocusable(false); tar.setFocusable(false);
tar.setEditable(false); tar.setEditable(false);
tar.setLineWrap(true); tar.setLineWrap(true);
tar.setWrapStyleWord(true); tar.setWrapStyleWord(true);
JScrollPane jsp = new JScrollPane(tar); JScrollPane jsp = new JScrollPane(tar);
jsp.setOpaque(false); jsp.setOpaque(false);
jsp.getViewport().setOpaque(false); jsp.getViewport().setOpaque(false);
this.pnlConsole.add(jsp, "w 95%!, gapleft 3%, gaptop 1%"); this.pnlConsole.add(jsp, "w 95%!, gapleft 3%, gaptop 1%");
} }
@@ -657,12 +657,12 @@ public class ViewTabber extends FRoundedPanel {
public void mousePressed(final MouseEvent e) { public void mousePressed(final MouseEvent e) {
DevLabel.this.setBackground(DevLabel.this.pressedBG); DevLabel.this.setBackground(DevLabel.this.pressedBG);
} }
@Override @Override
public void mouseReleased(final MouseEvent e) { public void mouseReleased(final MouseEvent e) {
DevLabel.this.setBackground(DevLabel.this.defaultBG); DevLabel.this.setBackground(DevLabel.this.defaultBG);
} }
@Override @Override
public void mouseEntered(final MouseEvent e) { public void mouseEntered(final MouseEvent e) {
DevLabel.this.setBackground(DevLabel.this.hoverBG); DevLabel.this.setBackground(DevLabel.this.hoverBG);