diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-03-14 21:51:01 +0100 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-03-14 21:51:01 +0100 |
commit | e36558c84c443b2236eb3dacd2e3f66981818232 (patch) | |
tree | 07d63ac2379630188bc68ca519871f79fe717ed1 /src/eu/equalparts/cardbase/cli | |
parent | d8f9c7946cabe1ce5c92d76495c790f92014be95 (diff) |
Transitioning to a better way to store card counts, not done yet though
Diffstat (limited to 'src/eu/equalparts/cardbase/cli')
-rw-r--r-- | src/eu/equalparts/cardbase/cli/CardbaseCLI.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eu/equalparts/cardbase/cli/CardbaseCLI.java b/src/eu/equalparts/cardbase/cli/CardbaseCLI.java index d526e78..8aece5d 100644 --- a/src/eu/equalparts/cardbase/cli/CardbaseCLI.java +++ b/src/eu/equalparts/cardbase/cli/CardbaseCLI.java @@ -337,7 +337,7 @@ public final class CardbaseCLI { int total = 0; for (Card card : cardbase.getCards()) { printGlance(card); - total += card.count; + total += cardbase.getCount(card.setCode, card.number); } System.out.println("Total: " + total); } @@ -365,7 +365,7 @@ public final class CardbaseCLI { int total = 0; for (Card card : cardbase.getCards()) { printPerusal(card); - total += card.count; + total += cardbase.getCount(card.setCode, card.number); } System.out.println("Total: " + total); } @@ -523,7 +523,7 @@ public final class CardbaseCLI { * @param card the card to glance. */ private void printGlance(Card card) { - System.out.println(String.format("%1$-4d %2$s (%3$s, %4$s)", card.count, card.name, card.setCode, card.number)); + System.out.println(String.format("%1$-4d %2$s (%3$s, %4$s)", cardbase.getCount(card.setCode, card.number), card.name, card.setCode, card.number)); } /** |