/** * Returns if this {@link Mana} object has more than or equal values of mana * as the passed in {@link Mana} object. Ignores {Any} mana to prevent * endless iterations. * * @param mana the mana to compare with * @return if this object has more than or equal mana to the passed in * {@link Mana}. */ public boolean includesMana(Mana mana) { return this.green >= mana.green && this.blue >= mana.blue && this.white >= mana.white && this.black >= mana.black && this.red >= mana.red && this.colorless >= mana.colorless && (this.generic >= mana.generic || this.countColored() + this.colorless >= mana.count()); }
private List<Mana> getPossiblePayCombinations(int number, Mana manaAvailable) { List<Mana> payCombinations = new ArrayList<>(); List<String> payCombinationsStrings = new ArrayList<>(); if (manaAvailable.countColored() > 0) {
Mana moreMana; Mana lessMana; if (mana2.countColored() > mana1.countColored() || mana2.getAny() > mana1.getAny() || mana2.count() > mana1.count()) { moreMana = mana2; lessMana = mana1;
int coloredAmount = mana.countColored(); switch (colorChosen.getOneColoredManaSymbol()) { case W:
continue ManaAbility; colored += mana.countColored();