Format mana costs for Echo, Cumulative Upkeep, and Unearth

This commit is contained in:
drdev
2013-11-16 19:25:43 +00:00
parent 5b3ee63299
commit 5eca8807d8
6 changed files with 39 additions and 37 deletions

View File

@@ -280,5 +280,4 @@ public final class ManaCost implements Comparable<ManaCost> {
res.sealClass(sh);
return res;
}
}

View File

@@ -10,6 +10,17 @@ public class ManaCostParser implements IParserManaCost {
private final String[] cost;
private int nextToken;
private int colorlessCost;
/**
* Parse the given cost and output formatted cost string
*
* @param cost
*/
public static String parse(final String cost) {
final ManaCostParser parser = new ManaCostParser(cost);
final ManaCost manaCost = new ManaCost(parser);
return manaCost.toString();
}
/**
* Instantiates a new parser cardname txt mana cost.
@@ -54,7 +65,6 @@ public class ManaCostParser implements IParserManaCost {
*/
@Override
public final ManaCostShard next() {
final String unparsed = this.cost[this.nextToken++];
// System.out.println(unparsed);
if (StringUtils.isNumeric(unparsed)) {