program towards Interface rather than implementations

This commit is contained in:
Ingmar Goudt 2020-02-10 10:39:56 +01:00
parent b04c436801
commit ae7919cd07
100 changed files with 218 additions and 209 deletions

View file

@ -70,7 +70,7 @@ public abstract class ActivatedManaAbilityImpl extends ActivatedAbilityImpl impl
@Override
public List<Mana> getNetMana(Game game) {
if (netMana.isEmpty()) {
ArrayList<Mana> dynamicNetMana = new ArrayList<>();
List<Mana> dynamicNetMana = new ArrayList<>();
for (Effect effect : getEffects()) {
if (effect instanceof ManaEffect) {
List<Mana> effectNetMana = ((ManaEffect) effect).getNetMana(game, this);
@ -81,7 +81,7 @@ public abstract class ActivatedManaAbilityImpl extends ActivatedAbilityImpl impl
}
return dynamicNetMana;
}
ArrayList<Mana> netManaCopy = new ArrayList<>();
List<Mana> netManaCopy = new ArrayList<>();
for (Mana mana : netMana) {
netManaCopy.add(mana.copy());
}