Test framework: fixed not working choices for replacement effects;

This commit is contained in:
Oleg Agafonov 2019-05-02 23:14:56 +04:00
parent 6c1ae7a049
commit 648026ac0b
2 changed files with 5 additions and 2 deletions

View file

@ -1406,11 +1406,13 @@ public class TestPlayer implements Player {
}
if (!choices.isEmpty()) {
for (String choice : choices) {
for (int index = 0; index < rEffects.size(); index++) {
if (choice.equals(rEffects.get(Integer.toString(index)))) {
int index = 0;
for (Map.Entry<String, String> entry : rEffects.entrySet()) {
if (entry.getValue().startsWith(choice)) {
choices.remove(choice);
return index;
}
index++;
}
}
// TODO: enable fail checks and fix tests