From f1ff4dbd0efe50ca9ad72ad54c326f81973e6d23 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Thu, 6 Jan 2022 03:51:46 -0500 Subject: [PATCH] Remove an unused and functionally duplicated Filter class --- .../FilterControlledCreatureInPlay.java | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 Mage/src/main/java/mage/filter/common/FilterControlledCreatureInPlay.java diff --git a/Mage/src/main/java/mage/filter/common/FilterControlledCreatureInPlay.java b/Mage/src/main/java/mage/filter/common/FilterControlledCreatureInPlay.java deleted file mode 100644 index 1e8b0d139d..0000000000 --- a/Mage/src/main/java/mage/filter/common/FilterControlledCreatureInPlay.java +++ /dev/null @@ -1,64 +0,0 @@ - -package mage.filter.common; - -import java.util.UUID; -import mage.constants.TargetController; -import mage.filter.FilterImpl; -import mage.filter.FilterInPlay; -import mage.game.Game; -import mage.game.permanent.Permanent; - -/** - * - * @author jeffwadsworth - */ -public class FilterControlledCreatureInPlay extends FilterImpl implements FilterInPlay { - - protected final FilterCreaturePermanent creatureFilter; - - public FilterControlledCreatureInPlay() { - this("creature"); - } - - public FilterControlledCreatureInPlay(String name) { - super(name); - creatureFilter = new FilterCreaturePermanent(); - creatureFilter.add(TargetController.YOU.getControllerPredicate()); - } - - @Override - public boolean checkObjectClass(Object object) { - return object instanceof Permanent; - } - - public FilterControlledCreatureInPlay(final FilterControlledCreatureInPlay filter) { - super(filter); - this.creatureFilter = filter.creatureFilter.copy(); - } - - @Override - public boolean match(Object o, Game game) { - if (o instanceof Permanent) { - return creatureFilter.match((Permanent) o, game); - } - return false; - } - - @Override - public boolean match(Object o, UUID sourceId, UUID playerId, Game game) { - if (o instanceof Permanent) { - return creatureFilter.match((Permanent) o, sourceId, playerId, game); - } - return false; - } - - public FilterCreaturePermanent getCreatureFilter() { - return this.creatureFilter; - } - - @Override - public FilterControlledCreatureInPlay copy() { - return new FilterControlledCreatureInPlay(this); - } - -}