fixed random mystery booster test failures

This commit is contained in:
Evan Kranzler 2020-09-29 19:35:32 -04:00
parent 827ffb5fb2
commit 3f4698434b
2 changed files with 41 additions and 12 deletions

View file

@ -85,6 +85,30 @@ public class FilterMana implements Serializable {
this.colorless = colorless;
}
public boolean isMulticolored() {
return getColorCount() > 1;
}
public int getColorCount() {
int colorCount = 0;
if (this.white) {
colorCount += 1;
}
if (this.blue) {
colorCount += 1;
}
if (this.black) {
colorCount += 1;
}
if (this.red) {
colorCount += 1;
}
if (this.green) {
colorCount += 1;
}
return colorCount;
}
public FilterMana copy() {
return new FilterMana(this);
}