diff options
Diffstat (limited to 'src/eu/equalparts/cardbase')
-rw-r--r-- | src/eu/equalparts/cardbase/data/ReferenceDeck.java | 29 | ||||
-rw-r--r-- | src/eu/equalparts/cardbase/data/StandaloneDeck.java | 10 |
2 files changed, 39 insertions, 0 deletions
diff --git a/src/eu/equalparts/cardbase/data/ReferenceDeck.java b/src/eu/equalparts/cardbase/data/ReferenceDeck.java new file mode 100644 index 0000000..7cdc15f --- /dev/null +++ b/src/eu/equalparts/cardbase/data/ReferenceDeck.java @@ -0,0 +1,29 @@ +package eu.equalparts.cardbase.data; + +import java.util.HashMap; +import java.util.Map; + +import eu.equalparts.cardbase.Cardbase; + +public class ReferenceDeck extends Deck { + + public Map<String, Integer> cardReferences = new HashMap<String, Integer>(); + + public ReferenceDeck() { + + } + + public ReferenceDeck(StandaloneDeck deck) { + this.name = deck.name; + this.plains = deck.plains; + this.islands = deck.islands; + this.swamps = deck.swamps; + this.mountains = deck.mountains; + this.forests = deck.forests; + + for (Card card : deck.cards) { + cardReferences.put(Cardbase.makeHash(card), card.count); + } + } + +} diff --git a/src/eu/equalparts/cardbase/data/StandaloneDeck.java b/src/eu/equalparts/cardbase/data/StandaloneDeck.java new file mode 100644 index 0000000..bfb7b55 --- /dev/null +++ b/src/eu/equalparts/cardbase/data/StandaloneDeck.java @@ -0,0 +1,10 @@ +package eu.equalparts.cardbase.data; + +import java.util.HashSet; +import java.util.Set; + +public class StandaloneDeck extends Deck { + + public Set<Card> cards = new HashSet<Card>(); + +} |