replace getColorFlags with hasColor

master
melvin 2012-10-09 22:41:18 +08:00
parent 5fbde53239
commit 257c13d3ed
1 changed files with 2 additions and 5 deletions

View File

@ -51,10 +51,8 @@ public class MagicColorChoice extends MagicChoice {
for (final MagicTarget target : targets) {
final MagicPermanent permanent=(MagicPermanent)target;
final int colorFlags=permanent.getColorFlags();
for (final MagicColor color : MagicColor.values()) {
if (color.hasColor(colorFlags)) {
if (permanent.hasColor(color)) {
counts[color.ordinal()]++;
}
}
@ -84,9 +82,8 @@ public class MagicColorChoice extends MagicChoice {
if (permanent.getController()==player) {
score=-score;
}
final int colorFlags=permanent.getColorFlags();
for (final MagicColor color : MagicColor.values()) {
if (color.hasColor(colorFlags)) {
if (permanent.hasColor(color)) {
scores[color.ordinal()]+=score;
}
}