diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2015-07-30 10:37:54 +0200 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2015-07-30 10:37:54 +0200 |
commit | 41981711f0240976c4fffc861995a8f2efebe191 (patch) | |
tree | c0bacae01b855c3be0e64a4d06e1945ea7bd0198 /src/eu/equalparts/cardbase/cli | |
parent | 3cb8dad3917cad4df95340253db5f5b743844f58 (diff) |
Refactored comparators, did a little bit of CLI testing but will need to look into mocking
Diffstat (limited to 'src/eu/equalparts/cardbase/cli')
-rw-r--r-- | src/eu/equalparts/cardbase/cli/CardbaseCLI.java | 8 |
1 files changed, 6 insertions, 2 deletions
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 @@ -48,6 +48,10 @@ public final class CardbaseCLI { */ Action lastAction = null; /** + * + */ + MTGUniverse mtgUniverse = new MTGUniverse(); + /** * The currently selected set, from which new cards are added. */ FullCardSet selectedSet = null; @@ -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 + "."); |