Refactor: added edit protection for some unmodifiable lists

This commit is contained in:
Oleg Agafonov 2023-03-25 15:22:13 +04:00
parent 1d17895caa
commit cfd7464b49
9 changed files with 22 additions and 34 deletions

View file

@ -45,7 +45,7 @@ public class Dungeon implements CommandObject {
dungeonNames.add("Dungeon of the Mad Mage");
}
private static final List<CardType> emptySet = Arrays.asList(CardType.DUNGEON);
private static final List<CardType> emptyList = Collections.unmodifiableList(Arrays.asList(CardType.DUNGEON));
private static final ObjectColor emptyColor = new ObjectColor();
private static final ManaCosts<ManaCost> emptyCost = new ManaCostsImpl<>();
@ -240,7 +240,7 @@ public class Dungeon implements CommandObject {
@Override
public List<CardType> getCardType(Game game) {
return emptySet;
return emptyList;
}
@Override