diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2015-07-12 21:07:03 +0200 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2015-07-12 21:07:03 +0200 |
commit | e319b8b0790d442d836958df41302af91d750313 (patch) | |
tree | 9998b09690a5b2b9b131350f428d49140b00c9fa /src/eu | |
parent | 7d3f8acf5260bf0d5458d258111e05a05859e535 (diff) |
Forgot to add deck files, done
Diffstat (limited to 'src/eu')
-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>(); + +} |