Merge pull request #6151 from magefree/refactorSubTypePredicate

Refactored SubTypePredicate to be part of SubType
This commit is contained in:
Evan Kranzler 2020-01-06 18:27:03 -05:00 committed by GitHub
commit 5a6f9022c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1660 changed files with 2070 additions and 3781 deletions

View file

@ -5,7 +5,6 @@ import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.Permanent;
import org.junit.Assert;
import org.junit.Test;
@ -36,7 +35,7 @@ public class SimpleGameTest extends CardTestMultiPlayerBase {
assertLife(playerD, 20);
FilterPermanent filterPermanent = new FilterLandPermanent();
filterPermanent.add(new SubtypePredicate(SubType.FOREST));
filterPermanent.add(SubType.FOREST.getPredicate());
List<Permanent> forestCards = currentGame.getBattlefield().getAllActivePermanents(filterPermanent, currentGame);
Assert.assertEquals(4, forestCards.size());
}