From 73d271d69b7ddca5dcc0343a769fa129bc4515df Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Tue, 5 Apr 2016 18:38:01 +0200 Subject: Refactoring.... --- src/eu/equalparts/cardbase/Cardbase.java | 9 +++++++++ .../equalparts/cardbase/cardstorage/ReferenceCardContainer.java | 1 + .../equalparts/cardbase/cardstorage/StandaloneCardContainer.java | 1 + 3 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/eu/equalparts/cardbase/Cardbase.java b/src/eu/equalparts/cardbase/Cardbase.java index 4404613..2d92d64 100644 --- a/src/eu/equalparts/cardbase/Cardbase.java +++ b/src/eu/equalparts/cardbase/Cardbase.java @@ -40,6 +40,15 @@ public class Cardbase implements StandaloneCardContainer { */ @JsonProperty private Map decks; + /** + * Creates a clean cardbase. + */ + public Cardbase() { + cardReferences = new HashMap<>(); + cardData = new HashMap<>(); + decks = new HashMap<>(); + } + /** * Creates and returns a cardbase with the contents of a file. * diff --git a/src/eu/equalparts/cardbase/cardstorage/ReferenceCardContainer.java b/src/eu/equalparts/cardbase/cardstorage/ReferenceCardContainer.java index 284fc89..34ea4c6 100644 --- a/src/eu/equalparts/cardbase/cardstorage/ReferenceCardContainer.java +++ b/src/eu/equalparts/cardbase/cardstorage/ReferenceCardContainer.java @@ -3,6 +3,7 @@ package eu.equalparts.cardbase.cardstorage; import eu.equalparts.cardbase.cards.Card; /** + * TODO fix comments * A class which holds card counts by reference (hash). * * @author Eduardo Pedroni diff --git a/src/eu/equalparts/cardbase/cardstorage/StandaloneCardContainer.java b/src/eu/equalparts/cardbase/cardstorage/StandaloneCardContainer.java index 517bf47..aa2a3cf 100644 --- a/src/eu/equalparts/cardbase/cardstorage/StandaloneCardContainer.java +++ b/src/eu/equalparts/cardbase/cardstorage/StandaloneCardContainer.java @@ -5,6 +5,7 @@ import java.util.Collection; import eu.equalparts.cardbase.cards.Card; /** + * TODO fix comments * Holds actual card data in addition to the card counts in {@code ReferenceCardContainer}. * * @author Eduardo Pedroni -- cgit v1.2.3