Add Draft and Sealed decks to Deck Manager

This commit is contained in:
drdev
2015-04-25 14:29:24 +00:00
parent 6a8c0ddece
commit 1018eb2db4
9 changed files with 51 additions and 6 deletions

View File

@@ -441,8 +441,9 @@ public class DeckProxy implements InventoryItem {
}
@SuppressWarnings("unchecked")
public static List<DeckProxy> getAllSealedDecks(IStorage<DeckGroup> sealed) {
public static List<DeckProxy> getAllSealedDecks() {
final List<DeckProxy> humanDecks = new ArrayList<DeckProxy>();
final IStorage<DeckGroup> sealed = FModel.getDecks().getSealed();
// Since AI decks are tied directly to the human choice,
// they're just mapped in a parallel map and grabbed when the game starts.
@@ -463,8 +464,9 @@ public class DeckProxy implements InventoryItem {
}
@SuppressWarnings("unchecked")
public static List<DeckProxy> getDraftDecks(IStorage<DeckGroup> draft) {
public static List<DeckProxy> getAllDraftDecks() {
ArrayList<DeckProxy> decks = new ArrayList<DeckProxy>();
IStorage<DeckGroup> draft = FModel.getDecks().getDraft();
for (DeckGroup d : draft) {
decks.add(new DeckProxy(d, "Draft", ((Function<IHasName, Deck>)(Object)DeckGroup.FN_HUMAN_DECK), GameType.Draft, draft));
}

View File

@@ -6,6 +6,8 @@ public enum DeckType {
COMMANDER_DECK ("Commander Decks"),
SCHEME_DECKS ("Scheme Decks"),
PLANAR_DECKS ("Planar Decks"),
DRAFT_DECKS ("Draft Decks"),
SEALED_DECKS ("Sealed Decks"),
PRECONSTRUCTED_DECK("Preconstructed Decks"),
QUEST_OPPONENT_DECK ("Quest Opponent Decks"),
COLOR_DECK ("Random Color Decks"),