mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Merge pull request #2959 from ingmargoudt/master
reformat manapool isempty
This commit is contained in:
commit
b640f6b289
1 changed files with 8 additions and 7 deletions
|
@ -231,7 +231,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
for (ManaCost cost : this) {
|
||||
if (!cost.isPaid() && cost instanceof ColorlessManaCost) {
|
||||
cost.assignPayment(game, ability, pool, costToPay);
|
||||
if (pool.count() == 0) {
|
||||
if (pool.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
for (ManaCost cost : this) {
|
||||
if (!cost.isPaid() && cost instanceof ColoredManaCost) {
|
||||
cost.assignPayment(game, ability, pool, costToPay);
|
||||
if (pool.count() == 0) {
|
||||
if (pool.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
for (ManaCost cost : this) {
|
||||
if (!cost.isPaid() && cost instanceof HybridManaCost) {
|
||||
cost.assignPayment(game, ability, pool, costToPay);
|
||||
if (pool.count() == 0) {
|
||||
if (pool.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
|| ((cost.containsColor(ColoredManaSymbol.G)) && pool.getGreen() > 0)
|
||||
|| ((cost.containsColor(ColoredManaSymbol.U)) && pool.getBlue() > 0)) {
|
||||
cost.assignPayment(game, ability, pool, costToPay);
|
||||
if (pool.count() == 0) {
|
||||
if (pool.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
for (ManaCost cost : this) {
|
||||
if (!cost.isPaid() && cost instanceof MonoHybridManaCost) {
|
||||
cost.assignPayment(game, ability, pool, costToPay);
|
||||
if (pool.count() == 0) {
|
||||
if (pool.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
for (ManaCost cost : this) {
|
||||
if (!cost.isPaid() && cost instanceof SnowManaCost) {
|
||||
cost.assignPayment(game, ability, pool, costToPay);
|
||||
if (pool.count() == 0) {
|
||||
if (pool.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
for (ManaCost cost : this) {
|
||||
if (!cost.isPaid() && cost instanceof GenericManaCost) {
|
||||
cost.assignPayment(game, ability, pool, costToPay);
|
||||
if (pool.count() == 0) {
|
||||
if (pool.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -357,6 +357,7 @@ public class ManaCostsImpl<T extends ManaCost> extends ArrayList<T> implements M
|
|||
}
|
||||
|
||||
private boolean isNumeric(String symbol) {
|
||||
|
||||
try {
|
||||
Integer.parseInt(symbol);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue