Refactor set's legality, Modern Horizons now available for modern formats;

This commit is contained in:
Oleg Agafonov 2019-03-04 04:49:49 +04:00
parent 6bfea7bfd9
commit e30eecead3
29 changed files with 86 additions and 89 deletions

View file

@ -51,15 +51,11 @@ public class Sets extends HashMap<String, ExpansionSet> {
throw new IllegalArgumentException("Set code " + set.getCode() + " already exists.");
}
this.put(set.getCode(), set);
if (set.isCustomSet()) {
if (set.getSetType().isCustomSet()) {
customSets.add(set.getCode());
}
}
public static boolean isCustomSet(String setCode) {
return getInstance().customSets.contains(setCode);
}
/**
* Generates card pool of cardsCount cards that have manacost of allowed
* colors.