From e319b8b0790d442d836958df41302af91d750313 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sun, 12 Jul 2015 21:07:03 +0200 Subject: Forgot to add deck files, done --- src/eu/equalparts/cardbase/data/ReferenceDeck.java | 29 ++++++++++++++++++++++ .../equalparts/cardbase/data/StandaloneDeck.java | 10 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/eu/equalparts/cardbase/data/ReferenceDeck.java create mode 100644 src/eu/equalparts/cardbase/data/StandaloneDeck.java (limited to 'src/eu/equalparts/cardbase') 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 cardReferences = new HashMap(); + + 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 cards = new HashSet(); + +} -- cgit v1.2.3