Moved MockAbility to stand alone class

This commit is contained in:
North 2013-06-26 20:34:34 +03:00
parent f57f6e6d91
commit d819053930
2 changed files with 25 additions and 23 deletions

View file

@ -0,0 +1,25 @@
package mage.cards;
import mage.abilities.AbilityImpl;
import mage.constants.AbilityType;
import mage.constants.Zone;
class MockAbility extends AbilityImpl<MockAbility> {
private final String text;
public MockAbility(String text) {
super(AbilityType.STATIC, Zone.ALL);
this.text = text;
}
@Override
public MockAbility copy() {
return this;
}
@Override
public String getRule(boolean all) {
return text;
}
}

View file

@ -3,12 +3,9 @@ package mage.cards;
import java.util.List; import java.util.List;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.AbilityImpl;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.cards.repository.CardInfo; import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository; import mage.cards.repository.CardRepository;
import mage.constants.AbilityType;
import mage.constants.Zone;
/** /**
* @author North * @author North
@ -73,24 +70,4 @@ public class MockCard extends CardImpl<MockCard> {
private Ability textAbilityFromString(final String text) { private Ability textAbilityFromString(final String text) {
return new MockAbility(text); return new MockAbility(text);
} }
private class MockAbility extends AbilityImpl<MockAbility> {
private final String text;
public MockAbility(String text) {
super(AbilityType.STATIC, Zone.ALL);
this.text = text;
}
@Override
public MockAbility copy() {
return this;
}
@Override
public String getRule(boolean all) {
return text;
}
}
} }