Support opening Deck Editor from home screen directly

Cleanup logic that builds deck lists
This commit is contained in:
drdev
2015-04-19 17:06:18 +00:00
parent da73cae604
commit f46214c4e0
5 changed files with 168 additions and 244 deletions

View File

@@ -131,14 +131,7 @@ public class FDeckChooser extends JPanel implements IDecksComboBoxListener {
private void updateColors() {
lstDecks.setAllowMultipleSelections(true);
String[] colors = new String[] { "Random 1", "Random 2", "Random 3",
"White", "Blue", "Black", "Red", "Green" };
ArrayList<DeckProxy> decks = new ArrayList<DeckProxy>();
for (int i = 0; i < colors.length; i++) {
decks.add(new ColorDeckGenerator(colors[i], i, lstDecks, isAi));
}
lstDecks.setPool(decks);
lstDecks.setPool(ColorDeckGenerator.getColorDecks(lstDecks, isAi));
lstDecks.setup(ItemManagerConfig.STRING_ONLY);
btnRandom.setText("Random Colors");