- Reverted Max' change of CardManaCost, because it messed up some parts of the game.

This commit is contained in:
Sloth
2012-07-29 16:16:06 +00:00
parent 07a302b691
commit 50d77bb500

View File

@@ -61,12 +61,11 @@ public final class CardManaCost implements Comparable<CardManaCost> {
* @param parser * @param parser
* the parser * the parser
*/ */
final static List<ManaCostShard> shardsTemp = new ArrayList<ManaCostShard>();
public CardManaCost(final IParserManaCost parser) { public CardManaCost(final IParserManaCost parser) {
if (!parser.hasNext()) { if (!parser.hasNext()) {
throw new RuntimeException("Empty manacost passed to parser (this should have been handled before)"); throw new RuntimeException("Empty manacost passed to parser (this should have been handled before)");
} }
shardsTemp.clear(); final List<ManaCostShard> shardsTemp = new ArrayList<ManaCostShard>();
this.hasNoCost = false; this.hasNoCost = false;
while (parser.hasNext()) { while (parser.hasNext()) {
final ManaCostShard shard = parser.next(); final ManaCostShard shard = parser.next();
@@ -79,7 +78,6 @@ public final class CardManaCost implements Comparable<CardManaCost> {
// here // here
this.shards = Collections.unmodifiableList(shardsTemp); this.shards = Collections.unmodifiableList(shardsTemp);
this.stringValue = this.getSimpleString(); this.stringValue = this.getSimpleString();
} }
private String getSimpleString() { private String getSimpleString() {