From 41981711f0240976c4fffc861995a8f2efebe191 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Thu, 30 Jul 2015 10:37:54 +0200 Subject: Refactored comparators, did a little bit of CLI testing but will need to look into mocking --- src/eu/equalparts/cardbase/cli/CardbaseCLI.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/eu/equalparts/cardbase/cli') diff --git a/src/eu/equalparts/cardbase/cli/CardbaseCLI.java b/src/eu/equalparts/cardbase/cli/CardbaseCLI.java index 0b2c869..8c0c97a 100644 --- a/src/eu/equalparts/cardbase/cli/CardbaseCLI.java +++ b/src/eu/equalparts/cardbase/cli/CardbaseCLI.java @@ -47,6 +47,10 @@ public final class CardbaseCLI { * The last action performed by the user. */ Action lastAction = null; + /** + * + */ + MTGUniverse mtgUniverse = new MTGUniverse(); /** * The currently selected set, from which new cards are added. */ @@ -267,7 +271,7 @@ public final class CardbaseCLI { * Print a list of valid set codes. */ void sets() { - for (CardSetInformation set : MTGUniverse.getCardSetList()) { + for (CardSetInformation set : mtgUniverse.getCardSetList()) { // CardSet has an overridden toString() System.out.println(set); } @@ -281,7 +285,7 @@ public final class CardbaseCLI { void set(String... args) { if (args != null && args.length > 0) { try { - selectedSet = MTGUniverse.getFullCardSet(args[0]); + selectedSet = mtgUniverse.getFullCardSet(args[0]); // if the set code is invalid, null is returned if (selectedSet != null) { System.out.println("Selected set: " + selectedSet.name + "."); -- cgit v1.2.3