mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- CheckStyle.
This commit is contained in:
@@ -63,17 +63,22 @@ public final class CardColor implements Comparable<CardColor> {
|
||||
public static CardColor fromNames(String... colors) {
|
||||
byte mask = 0;
|
||||
for (String s : colors) {
|
||||
if ( s.equalsIgnoreCase(Constant.Color.WHITE) || s.equalsIgnoreCase("w"))
|
||||
if (s.equalsIgnoreCase(Constant.Color.WHITE) || s.equalsIgnoreCase("w")) {
|
||||
mask |= WHITE;
|
||||
if ( s.equalsIgnoreCase(Constant.Color.BLUE) || s.equalsIgnoreCase("u"))
|
||||
}
|
||||
if (s.equalsIgnoreCase(Constant.Color.BLUE) || s.equalsIgnoreCase("u")) {
|
||||
mask |= BLUE;
|
||||
if ( s.equalsIgnoreCase(Constant.Color.BLACK) || s.equalsIgnoreCase("b"))
|
||||
}
|
||||
if (s.equalsIgnoreCase(Constant.Color.BLACK) || s.equalsIgnoreCase("b")) {
|
||||
mask |= BLACK;
|
||||
if ( s.equalsIgnoreCase(Constant.Color.RED) || s.equalsIgnoreCase("r"))
|
||||
}
|
||||
if (s.equalsIgnoreCase(Constant.Color.RED) || s.equalsIgnoreCase("r")) {
|
||||
mask |= RED;
|
||||
if ( s.equalsIgnoreCase(Constant.Color.GREEN) || s.equalsIgnoreCase("g"))
|
||||
}
|
||||
if (s.equalsIgnoreCase(Constant.Color.GREEN) || s.equalsIgnoreCase("g")) {
|
||||
mask |= GREEN;
|
||||
}
|
||||
}
|
||||
return fromMask(mask);
|
||||
}
|
||||
|
||||
@@ -107,13 +112,12 @@ public final class CardColor implements Comparable<CardColor> {
|
||||
return (this.myColor & colormask) == colormask;
|
||||
}
|
||||
|
||||
/** this has no other colors except defined by operand */
|
||||
/** this has no other colors except defined by operand. */
|
||||
public boolean hasNoColorsExcept(final int colormask) {
|
||||
return (this.myColor & ~colormask) == 0;
|
||||
}
|
||||
|
||||
|
||||
/** Operand has no other colors except defined by this */
|
||||
/** Operand has no other colors except defined by this. */
|
||||
public boolean containsAllColorsFrom(int colorProfile) {
|
||||
return (~this.myColor & colorProfile) == 0;
|
||||
}
|
||||
|
||||
@@ -216,9 +216,10 @@ public final class CardManaCost implements Comparable<CardManaCost> {
|
||||
*/
|
||||
public boolean hasPhyrexian() {
|
||||
for (CardManaCostShard shard : shards) {
|
||||
if ( shard.isPhyrexian() )
|
||||
if (shard.isPhyrexian()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -229,9 +230,10 @@ public final class CardManaCost implements Comparable<CardManaCost> {
|
||||
public int countX() {
|
||||
int iX = 0;
|
||||
for (CardManaCostShard shard : shards) {
|
||||
if ( shard == CardManaCostShard.X )
|
||||
if (shard == CardManaCostShard.X) {
|
||||
iX++;
|
||||
}
|
||||
}
|
||||
return iX;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,8 +154,8 @@ public abstract class AbstractCardFactory implements CardFactoryInterface {
|
||||
*/
|
||||
@Override
|
||||
public Iterator<Card> iterator() {
|
||||
if ( allCardsReadOnly == null )
|
||||
{
|
||||
if (allCardsReadOnly == null) {
|
||||
|
||||
allCardsReadOnly = Collections.unmodifiableList(getAllCards());
|
||||
}
|
||||
return allCardsReadOnly.iterator();
|
||||
|
||||
@@ -84,7 +84,6 @@ public class CardFactoryCreatures {
|
||||
card.addSpellAbility(spell);
|
||||
}
|
||||
|
||||
|
||||
private static void getCard_GilderBairn(final Card card, final String cardName) {
|
||||
final Cost abCost = new Cost(card, "2 GU Untap", true);
|
||||
final Target tgt = new Target(card, "Select target permanent.", new String[] { "Permanent" });
|
||||
@@ -299,7 +298,6 @@ public class CardFactoryCreatures {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}
|
||||
|
||||
|
||||
private static void getCard_SkySwallower(final Card card, final String cardName) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user