forked from External/mage
fixed two small refactor errors
This commit is contained in:
parent
8876d39491
commit
29efa7b067
3 changed files with 25 additions and 25 deletions
|
|
@ -163,29 +163,6 @@ public enum CounterType {
|
|||
WIND("wind"),
|
||||
WISH("wish");
|
||||
|
||||
private static class CounterPredicate implements Predicate<Card> {
|
||||
|
||||
private final CounterType counter;
|
||||
|
||||
private CounterPredicate(CounterType counter) {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Card input, Game game) {
|
||||
if (counter == null) {
|
||||
return !input.getCounters(game).keySet().isEmpty();
|
||||
} else {
|
||||
return input.getCounters(game).containsKey(counter);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CounterType(" + counter.getName() + ')';
|
||||
}
|
||||
}
|
||||
|
||||
private final String name;
|
||||
private final CounterPredicate predicate;
|
||||
|
||||
|
|
@ -281,4 +258,27 @@ public enum CounterType {
|
|||
public CounterPredicate getPredicate() {
|
||||
return predicate;
|
||||
}
|
||||
|
||||
private static class CounterPredicate implements Predicate<Card> {
|
||||
|
||||
private final CounterType counter;
|
||||
|
||||
private CounterPredicate(CounterType counter) {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Card input, Game game) {
|
||||
if (counter == null) {
|
||||
return !input.getCounters(game).keySet().isEmpty();
|
||||
} else {
|
||||
return input.getCounters(game).containsKey(counter);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CounterType(" + counter.getName() + ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue