aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/equalparts/cardbase/data
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2015-07-13 03:31:02 +0200
committerEduardo Pedroni <ep625@york.ac.uk>2015-07-13 03:31:02 +0200
commit19183986d37c5ca1a31a5b308bace92b87430ffe (patch)
treefc2bf0fc6bed0fa836a8c1401f16d967b639b491 /src/eu/equalparts/cardbase/data
parente319b8b0790d442d836958df41302af91d750313 (diff)
Added some statistics functionality, TDD
Diffstat (limited to 'src/eu/equalparts/cardbase/data')
-rw-r--r--src/eu/equalparts/cardbase/data/Card.java63
-rw-r--r--src/eu/equalparts/cardbase/data/CardSetInformation.java34
-rw-r--r--src/eu/equalparts/cardbase/data/Deck.java12
-rw-r--r--src/eu/equalparts/cardbase/data/FullCardSet.java26
-rw-r--r--src/eu/equalparts/cardbase/data/ReferenceDeck.java29
-rw-r--r--src/eu/equalparts/cardbase/data/StandaloneDeck.java10
6 files changed, 0 insertions, 174 deletions
diff --git a/src/eu/equalparts/cardbase/data/Card.java b/src/eu/equalparts/cardbase/data/Card.java
deleted file mode 100644
index 8ac5cd1..0000000
--- a/src/eu/equalparts/cardbase/data/Card.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package eu.equalparts.cardbase.data;
-
-import eu.equalparts.cardbase.comparator.SpecialFields.DirtyNumber;
-import eu.equalparts.cardbase.comparator.SpecialFields.Rarity;
-
-public class Card {
-
- public String name;
- public String layout;
- public String manaCost;
- public Integer cmc;
- public String type;
- @Rarity
- public String rarity;
- public String text;
- public String flavor;
- public String artist;
- @DirtyNumber
- public String number;
- @DirtyNumber
- public String power;
- @DirtyNumber
- public String toughness;
- public Integer loyalty;
- public Integer multiverseid;
- public String imageName;
- public String border;
- public String watermark;
-
- // Not part of upstream JSON
- public String setCode;
- public String imageCode;
- public Integer count;
-
- @Override
- public Card clone() {
- Card clone = new Card();
-
- clone.name = this.name;
- clone.layout = this.layout;
- clone.manaCost = this.manaCost;
- clone.cmc = this.cmc;
- clone.type = this.type;
- clone.rarity = this.rarity;
- clone.text = this.text;
- clone.flavor = this.flavor;
- clone.artist = this.artist;
- clone.number = this.number;
- clone.power = this.power;
- clone.toughness = this.toughness;
- clone.loyalty = this.loyalty;
- clone.multiverseid = this.multiverseid;
- clone.imageName = this.imageName;
- clone.border = this.border;
- clone.watermark = this.watermark;
- clone.setCode = this.setCode;
- clone.imageCode = this.imageCode;
- clone.count = this.count;
-
- return clone;
- }
-
-} \ No newline at end of file
diff --git a/src/eu/equalparts/cardbase/data/CardSetInformation.java b/src/eu/equalparts/cardbase/data/CardSetInformation.java
deleted file mode 100644
index d3394b7..0000000
--- a/src/eu/equalparts/cardbase/data/CardSetInformation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package eu.equalparts.cardbase.data;
-
-public class CardSetInformation {
-
- private String name;
- private String code;
- private String releaseDate;
-
- /**
- * @return the set's name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * @return the set code.
- */
- public String getCode() {
- return code;
- }
-
- /**
- * @return the set's release date.
- */
- public String getReleaseDate() {
- return releaseDate;
- }
-
- @Override
- public String toString() {
- return String.format("%1$-12s : %2$s", code, name, releaseDate);
- }
-}
diff --git a/src/eu/equalparts/cardbase/data/Deck.java b/src/eu/equalparts/cardbase/data/Deck.java
deleted file mode 100644
index 6a6658a..0000000
--- a/src/eu/equalparts/cardbase/data/Deck.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package eu.equalparts.cardbase.data;
-
-public abstract class Deck {
-
- public String name = "Unnamed Deck";
- public int plains = 0,
- islands = 0,
- swamps = 0,
- mountains = 0,
- forests = 0;
-
-}
diff --git a/src/eu/equalparts/cardbase/data/FullCardSet.java b/src/eu/equalparts/cardbase/data/FullCardSet.java
deleted file mode 100644
index a7f3ea5..0000000
--- a/src/eu/equalparts/cardbase/data/FullCardSet.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package eu.equalparts.cardbase.data;
-
-import java.util.Map;
-
-public class FullCardSet {
-
- public String name;
- public String code;
- public String magicCardsInfoCode;
- public String releaseDate;
- public String border;
- public String type;
- public String block;
- public String gathererCode;
- public Map<String, Card> cards;
-
- /**
- * Searches for a card by number (the one shown on the card itself).
- *
- * @param number the number of the card to search.
- * @return the requested {@code Card}, or null if no card is found with that number.
- */
- public Card getCardByNumber(String number) {
- return cards.get(number);
- }
-} \ No newline at end of file
diff --git a/src/eu/equalparts/cardbase/data/ReferenceDeck.java b/src/eu/equalparts/cardbase/data/ReferenceDeck.java
deleted file mode 100644
index 7cdc15f..0000000
--- a/src/eu/equalparts/cardbase/data/ReferenceDeck.java
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644
index bfb7b55..0000000
--- a/src/eu/equalparts/cardbase/data/StandaloneDeck.java
+++ /dev/null
@@ -1,10 +0,0 @@
-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>();
-
-}