Fixed some problems with constructed formats definition and custom sets.

This commit is contained in:
LevelX2 2016-10-03 20:25:08 +02:00
parent 7dfcb15c3c
commit 9a00dd20ca
5 changed files with 45 additions and 34 deletions

View file

@ -48,9 +48,6 @@ public class Constructed extends DeckValidator {
protected List<String> setCodes = new ArrayList<>();
protected List<Rarity> rarities = new ArrayList<>();
protected boolean allowAllCustomSets = false;
protected Set<String> allowedCustomSetCodes = new HashSet<>();
public Constructed() {
super("Constructed");
}
@ -173,12 +170,7 @@ public class Constructed extends DeckValidator {
* @return Whether the set is legal in this format.
*/
protected boolean isSetAllowed(String code) {
// To check here for custom set makes no sens IMHO because the format does define what's aloowed and what not
// if (Sets.isCustomSet(code)) {
// return allowAllCustomSets || allowedCustomSetCodes.contains(code);
// } else {
return setCodes.isEmpty() || setCodes.contains(code);
// }
}
/**