list.size > 0 changed to !list.isEmpty

We care about if it's empty or not, not about it's size
This commit is contained in:
vraskulin 2017-01-27 16:04:56 +03:00
parent f60ebfbb1f
commit 0557b5e89c
366 changed files with 532 additions and 548 deletions

View file

@ -93,13 +93,13 @@ public class DelveAbility extends SimpleStaticAbility implements AlternateManaPa
@Override
public String getRule() {
return "Delve <i>(Each card you exile from your graveyard while casting this spell pays for {1}.)</i>";
return "Delve <i>(Each card you exile from your graveyard while casting this spell pays for {1}.)</i>";
}
@Override
public void addSpecialAction(Ability source, Game game, ManaCost unpaid) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && controller.getGraveyard().size() > 0) {
if (controller != null && !controller.getGraveyard().isEmpty()) {
if (unpaid.getMana().getGeneric() > 0 && source.getAbilityType().equals(AbilityType.SPELL)) {
SpecialAction specialAction = new DelveSpecialAction();
specialAction.setControllerId(source.getControllerId());
@ -159,7 +159,7 @@ class DelveEffect extends OneShotEffect {
ExileFromGraveCost exileFromGraveCost = (ExileFromGraveCost) source.getCosts().get(0);
List<Card> exiledCards = exileFromGraveCost.getExiledCards();
if (exiledCards.size() > 0) {
if (!exiledCards.isEmpty()) {
Cards toDelve = new CardsImpl();
for (Card card : exiledCards) {
toDelve.add(card);