correct the choice out of available flip results

This commit is contained in:
Maxmtg
2013-06-24 12:53:22 +00:00
parent 5038d5e838
commit b074af6d41

View File

@@ -637,8 +637,12 @@ public class PlayerControllerHuman extends PlayerController {
@Override
public boolean chooseFilpResult(SpellAbility sa, Player flipper, boolean[] results, boolean call) {
String[] labels = call ? new String[]{"heads", "tails"} : new String[]{"win the flip", "lose the flip"};
return GuiChoose.one(sa.getSourceCard().getName() + " - Choose a result", labels) == labels[0];
String[] labelsSrc = call ? new String[]{"heads", "tails"} : new String[]{"win the flip", "lose the flip"};
String[] strResults = new String[results.length];
for(int i = 0; i < results.length; i++) {
strResults[i] = labelsSrc[results[i] ? 0 : 1];
}
return GuiChoose.one(sa.getSourceCard().getName() + " - Choose a result", strResults) == labelsSrc[0];
}