- CheckStyle.

This commit is contained in:
Chris
2012-05-25 17:40:45 +00:00
parent 6281803987
commit d4bd459a76
3 changed files with 24 additions and 18 deletions

View File

@@ -259,17 +259,21 @@ public final class CardUtil {
final byte color_profile = m.getColorProfile(); final byte color_profile = m.getColorProfile();
final Set<String> colors = new HashSet<String>(); final Set<String> colors = new HashSet<String>();
if ((color_profile & forge.card.CardColor.WHITE) > 0 ) if ((color_profile & forge.card.CardColor.WHITE) > 0) {
colors.add(Constant.Color.WHITE); colors.add(Constant.Color.WHITE);
if ((color_profile & forge.card.CardColor.BLACK) > 0 ) }
if ((color_profile & forge.card.CardColor.BLACK) > 0) {
colors.add(Constant.Color.BLACK); colors.add(Constant.Color.BLACK);
if ((color_profile & forge.card.CardColor.BLUE) > 0 ) }
if ((color_profile & forge.card.CardColor.BLUE) > 0) {
colors.add(Constant.Color.BLUE); colors.add(Constant.Color.BLUE);
if ((color_profile & forge.card.CardColor.RED) > 0 ) }
if ((color_profile & forge.card.CardColor.RED) > 0) {
colors.add(Constant.Color.RED); colors.add(Constant.Color.RED);
if ((color_profile & forge.card.CardColor.GREEN) > 0 ) }
if ((color_profile & forge.card.CardColor.GREEN) > 0) {
colors.add(Constant.Color.GREEN); colors.add(Constant.Color.GREEN);
}
for (final String kw : c.getKeyword()) { for (final String kw : c.getKeyword()) {
if (kw.startsWith(c.getName() + " is ") || kw.startsWith("CARDNAME is ")) { if (kw.startsWith(c.getName() + " is ") || kw.startsWith("CARDNAME is ")) {

View File

@@ -139,13 +139,15 @@ public final class CardManaCost implements Comparable<CardManaCost> {
} }
public int getShardCount(ManaCostShard which) { public int getShardCount(ManaCostShard which) {
if ( which == ManaCostShard.COLORLESS ) if (which == ManaCostShard.COLORLESS) {
return genericCost; return genericCost;
}
int res = 0; int res = 0;
for(ManaCostShard shard : shards) for (ManaCostShard shard : shards) {
{ if (shard == which) {
if ( shard == which ) res++; res++;
}
} }
return res; return res;
} }