From e36558c84c443b2236eb3dacd2e3f66981818232 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Mon, 14 Mar 2016 21:51:01 +0100 Subject: Transitioning to a better way to store card counts, not done yet though --- src/eu/equalparts/cardbase/decks/ReferenceDeck.java | 3 ++- src/eu/equalparts/cardbase/decks/Statistics.java | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/eu/equalparts/cardbase/decks') diff --git a/src/eu/equalparts/cardbase/decks/ReferenceDeck.java b/src/eu/equalparts/cardbase/decks/ReferenceDeck.java index 5650d2f..2303f24 100644 --- a/src/eu/equalparts/cardbase/decks/ReferenceDeck.java +++ b/src/eu/equalparts/cardbase/decks/ReferenceDeck.java @@ -21,8 +21,9 @@ public class ReferenceDeck extends Deck { this.mountains = deck.mountains; this.forests = deck.forests; + // TODO sort this out for (Card card : deck.cards) { - cardReferences.put(card.hashCode(), card.count); + cardReferences.put(card.hashCode(), 1); } } diff --git a/src/eu/equalparts/cardbase/decks/Statistics.java b/src/eu/equalparts/cardbase/decks/Statistics.java index 9efc82a..d48dd59 100644 --- a/src/eu/equalparts/cardbase/decks/Statistics.java +++ b/src/eu/equalparts/cardbase/decks/Statistics.java @@ -19,7 +19,8 @@ public final class Statistics { for (Card card : deck.cards) { if (card.type != null && card.type.contains(type)) { - count += card.count; + // TODO sort this out + count += 1; } } return count; @@ -29,7 +30,8 @@ public final class Statistics { int totalCards = countBasicLands(deck); for (Card card : deck.cards) { - totalCards += card.count; + // TODO sort this out + totalCards += 1; } return totalCards; @@ -55,7 +57,8 @@ public final class Statistics { for (Card card : deck.cards) { if (card.type != null && card.type.contains(type)) if (card.cmc != null) - costs[card.cmc] += card.count; + // TODO sort this out + costs[card.cmc] += 1; } return costs; @@ -71,7 +74,8 @@ public final class Statistics { int[] costs = new int[arraySize]; for (Card card : deck.cards) { if (card.cmc != null) - costs[card.cmc] += card.count; + // TODO sort this out + costs[card.cmc] += 1; } return costs; -- cgit v1.2.3