reorganized various constructed formats

This commit is contained in:
Evan Kranzler 2022-03-18 09:49:34 -04:00
parent 4967750669
commit 0d038b1737
12 changed files with 23 additions and 102 deletions

View file

@ -30,12 +30,8 @@ public class Constructed extends DeckValidator {
protected List<Rarity> rarities = new ArrayList<>();
protected Set<String> singleCards = new HashSet<>();
public Constructed() {
super("Constructed");
}
protected Constructed(String name) {
super(name);
this(name, null);
}
protected Constructed(String name, String shortName) {

View file

@ -15,10 +15,6 @@ public abstract class DeckValidator implements Serializable {
protected String shortName;
protected List<DeckValidatorError> errorsList = new ArrayList<>();
public DeckValidator(String name) {
setName(name);
}
public DeckValidator(String name, String shortName) {
setName(name, shortName);
}
@ -33,14 +29,13 @@ public abstract class DeckValidator implements Serializable {
return shortName;
}
protected void setName(String name) {
this.name = name;
this.shortName = name.contains("-") ? name.substring(name.indexOf("-") + 1).trim() : name;
}
protected void setName(String name, String shortName) {
this.name = name;
this.shortName = shortName;
if (shortName != null) {
this.shortName = shortName;
} else {
this.shortName = name.contains("-") ? name.substring(name.indexOf("-") + 1).trim() : name;
}
}
protected void setShortName(String shortName) {