* Performance: memory usage optimization for deck editor (part 2 of removed bloated usage of ManaCosts -> ManaColor objects, see #7515);

This commit is contained in:
Oleg Agafonov 2021-02-12 22:12:18 +04:00
parent c1dea5b21e
commit 10e557b873
25 changed files with 164 additions and 113 deletions

View file

@ -134,7 +134,7 @@ public final class DeckBuilder {
final Map<String, Integer> colorCount = new HashMap<>();
for (final Card card : deck.getCards()) {
for (String symbol : card.getManaCost().getSymbols()) {
for (String symbol : card.getManaCostSymbols()) {
int count = 0;
symbol = symbol.replace("{", "").replace("}", "");
if (isColoredMana(symbol)) {
@ -243,7 +243,7 @@ public final class DeckBuilder {
int maxSingleCount = 0;
int multicolor = 0;
Set<String> colors = new HashSet<>();
for (String symbol : card.getManaCost().getSymbols()) {
for (String symbol : card.getManaCostSymbols()) {
int count = 0;
symbol = symbol.replace("{", "").replace("}", "");
if (isColoredMana(symbol)) {