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/decks | |
parent | d8f9c7946cabe1ce5c92d76495c790f92014be95 (diff) |
Transitioning to a better way to store card counts, not done yet though
Diffstat (limited to 'src/eu/equalparts/cardbase/decks')
-rw-r--r-- | src/eu/equalparts/cardbase/decks/ReferenceDeck.java | 3 | ||||
-rw-r--r-- | src/eu/equalparts/cardbase/decks/Statistics.java | 12 |
2 files changed, 10 insertions, 5 deletions
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; |