Rob Cashwalker wrote:- Code: Select all
String color = new String();
String warn = new String();
int n = 0;
int nn;
while (n < 3) {
color = (String)JOptionPane.showInputDialog(null, warn+"Enter a Mana character: [W,U,B,R,G]", "Pick mana color", JOptionPane.QUESTION_MESSAGE);
color = color.trim().substring(0,1).toUpperCase();
if (!"WUBRG".contains(color))
{
n++;
nn = 3 - n;
warn = "Bad input -"+color+". "+nn+" more tries.\n";
}
else
break;
}
Huh? "<nn> more tries"??? Wouldn't it be easier to use the familiar old
- Code: Select all
AllZone.Display.getChoice("Choose mana color",Constant.Color.Colors[]);
, i.e. replace above "type in letter of mana color" mess with
- Code: Select all
String Colorname = AllZone.Display.getChoice("Choose color",Constant.Color.Colors[]);
String color=Input_PayManaCostUtil.getColor(Colorname);
Also, the many instances of
- Code: Select all
CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, Constant.Player.Human).getCards());
list = list.getName("Mana Pool");
Card mp = list.getCard(0);
are getting annoying, I think we should put that in as a constant somewhere(e.g. "AllZone.Human_Play.Mana_Pool") instead of copying it for every card that uses it
