mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
Added Innistrad block option to deck generator
This commit is contained in:
parent
d75af7c14e
commit
7740143e07
2 changed files with 11 additions and 2 deletions
|
@ -74,7 +74,7 @@ public class DeckGenerator {
|
|||
JPanel jPanel = new JPanel();
|
||||
JLabel text3 = new JLabel("Choose format:");
|
||||
formats = new JComboBox(ConstructedFormats.getTypes());
|
||||
formats.setSelectedIndex(3);
|
||||
formats.setSelectedIndex(0);
|
||||
formats.setPreferredSize(new Dimension(100, 25));
|
||||
formats.setMaximumSize(new Dimension(100, 25));
|
||||
formats.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
*/
|
||||
public class ConstructedFormats {
|
||||
|
||||
private static final String[] constructedFormats = {"Standard", "Extended", "Modern", "All"};
|
||||
private static final String[] constructedFormats = {"ISD\\DKA\\AVR", "Standard", "Extended", "Modern", "All"};
|
||||
|
||||
private ConstructedFormats() {
|
||||
}
|
||||
|
@ -30,6 +30,9 @@ public class ConstructedFormats {
|
|||
}
|
||||
|
||||
public static List<String> getSetsByFormat(String format) {
|
||||
if (format.equals("ISD\\DKA\\AVR")) {
|
||||
return innistradBlock;
|
||||
}
|
||||
if (format.equals("Standard")) {
|
||||
return standard;
|
||||
}
|
||||
|
@ -45,6 +48,9 @@ public class ConstructedFormats {
|
|||
private static void buildLists() {
|
||||
for (String setCode : CardsStorage.getSetCodes()) {
|
||||
ExpansionSet set = Sets.findSet(setCode);
|
||||
if (set.getReleaseDate().after(innistradBlockDate)) {
|
||||
innistradBlock.add(set.getCode());
|
||||
}
|
||||
if (set.getReleaseDate().after(standardDate)) {
|
||||
standard.add(set.getCode());
|
||||
}
|
||||
|
@ -57,6 +63,9 @@ public class ConstructedFormats {
|
|||
}
|
||||
}
|
||||
|
||||
private static final List<String> innistradBlock = new ArrayList<String>();
|
||||
private static final Date innistradBlockDate = new GregorianCalendar(2011, 9, 29).getTime();
|
||||
|
||||
private static final List<String> standard = new ArrayList<String>();
|
||||
private static final Date standardDate = new GregorianCalendar(2010, 9, 20).getTime();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue