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