mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Minor farmating changes.
This commit is contained in:
parent
db24d6e41d
commit
9fb66bd065
1 changed files with 6 additions and 3 deletions
|
@ -59,9 +59,10 @@ public class Choices extends ArrayList<Choice> {
|
|||
public List<Choice> getUnchosen() {
|
||||
List<Choice> unchosen = new ArrayList<Choice>();
|
||||
for (Choice choice: this) {
|
||||
if (!choice.isChosen())
|
||||
if (!choice.isChosen()) {
|
||||
unchosen.add(choice);
|
||||
}
|
||||
}
|
||||
return unchosen;
|
||||
}
|
||||
|
||||
|
@ -73,9 +74,10 @@ public class Choices extends ArrayList<Choice> {
|
|||
|
||||
public boolean isChosen() {
|
||||
for (Choice choice: this) {
|
||||
if (!choice.isChosen())
|
||||
if (!choice.isChosen()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -84,10 +86,11 @@ public class Choices extends ArrayList<Choice> {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
while (!isChosen()) {
|
||||
Choice choice = this.getUnchosen().get(0);
|
||||
if (!player.choose(outcome, choice, game))
|
||||
if (!player.choose(outcome, choice, game)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue