[LTR] Implement Nazgul

This commit is contained in:
theelk801 2023-05-30 18:24:54 -04:00
parent 75d1bdf71c
commit 82073bba73
5 changed files with 122 additions and 16 deletions

View file

@ -38,7 +38,7 @@ public class Limited extends DeckValidator {
Map<String, Integer> counts = new HashMap<>();
countCards(counts, deck.getCards());
for (Map.Entry<String, Integer> entry : counts.entrySet()) {
if (entry.getValue() > 7 && entry.getKey().equals("Seven Dwarves")) {
if (entry.getValue() > getMaxCopies(entry.getKey(), Integer.MAX_VALUE)) {
addError(DeckValidatorErrorType.OTHER, entry.getKey(), "Too many: " + entry.getValue(), true);
valid = false;
}