From 4b5378c423a96560bfb09797f96fd840f74673db Mon Sep 17 00:00:00 2001 From: ingmargoudt Date: Sat, 11 Mar 2017 13:52:46 +0100 Subject: [PATCH] pool.count() == 0 ---> pool.isEmpty() --- .../mage/abilities/costs/mana/ManaCostsImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java index 6f69afd8e6..ac00686e7b 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -231,7 +231,7 @@ public class ManaCostsImpl extends ArrayList 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 extends ArrayList 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 extends ArrayList 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 extends ArrayList 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 extends ArrayList 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 extends ArrayList 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 extends ArrayList 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 extends ArrayList implements M } private boolean isNumeric(String symbol) { + try { Integer.parseInt(symbol); return true;