simplification in AF_ChooseColor

This commit is contained in:
slapshot5
2011-10-15 04:11:43 +00:00
parent 9e9f824731
commit 52d3cce338

View File

@@ -590,25 +590,10 @@ public class AbilityFactory_Choose {
for (Player p : tgtPlayers) {
if (tgt == null || p.canTarget(sa)) {
List<String> colors = new ArrayList<String>(Arrays.asList(Constant.Color.onlyColors));
if (sa.getActivatingPlayer().isHuman()) {
if (params.containsKey("OrColors")) {
//ArrayList<String> chosenColors = new ArrayList<String>();
//boolean done = false;
//while (!done) {
List<String> o = GuiUtils.getChoices("Choose a color or colors", colors.toArray(new String[0]));
/*if (null == o) {
done = true;
}
else {
String thisColor = (String) o;
chosenColors.add(thisColor);
colors.remove(thisColor);
card.setChosenColor(chosenColors);
}
*/
List<String> o = GuiUtils.getChoices("Choose a color or colors", Constant.Color.onlyColors);
card.setChosenColor(new ArrayList<String>(o));
//}
}
else {
Object o = GuiUtils.getChoice("Choose a color", Constant.Color.onlyColors);