aboutsummaryrefslogtreecommitdiffstats
path: root/test/Testest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/Testest.java')
-rw-r--r--test/Testest.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/test/Testest.java b/test/Testest.java
index 7128b75..855568d 100644
--- a/test/Testest.java
+++ b/test/Testest.java
@@ -7,15 +7,15 @@ import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import eu.equalparts.cardbase.Cardbase;
-import eu.equalparts.cardbase.data.Card;
-import eu.equalparts.cardbase.data.StandaloneDeck;
+import eu.equalparts.cardbase.cards.Card;
+import eu.equalparts.cardbase.decks.StandaloneDeck;
import eu.equalparts.cardbase.utils.JSON;
public class Testest {
public static void main(String... args) throws JsonParseException, JsonMappingException, MalformedURLException, IOException {
- StandaloneDeck deck = JSON.mapper.readValue(new File("control.cbd"), StandaloneDeck.class);
+ StandaloneDeck deck = JSON.mapper.readValue(new File("deck.cbd"), StandaloneDeck.class);
System.out.println(deck.name);
System.out.println("plains: " + deck.plains);
@@ -24,15 +24,11 @@ public class Testest {
System.out.println("mountains: " + deck.mountains);
System.out.println("forests: " + deck.forests);
+ int count = 0;
for (Card card : deck.cards) {
- System.out.println(card.count + "x " + card.name);
- }
-
- Cardbase cards = new Cardbase(new File("cards.cb"));
- List<Card> missingCards = cards.getMissingCards(deck);
-
- for (Card card : missingCards) {
- System.out.println(card.count + "x " + card.name);
+ if (card.type != null && card.type.contains("Instant"))
+ System.out.println(card.count + "x " + card.cmc + " (" + card.name + ")");
}
+ System.out.println("total: " + count);
}
}