if artificial choice is empty, getSimulationResultChoice returns null
parent
7b2606e6c9
commit
2323cdbedc
|
@ -80,8 +80,12 @@ public abstract class MagicChoice {
|
|||
final MagicPlayer player,
|
||||
final MagicSource source) {
|
||||
final List<Object[]> choices = getArtificialChoiceResults(game, event, player, source);
|
||||
if (choices.size() == 0) {
|
||||
return null;
|
||||
} else {
|
||||
return choices.get(MagicRandom.nextInt(choices.size()));
|
||||
}
|
||||
}
|
||||
|
||||
/** Gets the choice results of the player. */
|
||||
public abstract Object[] getPlayerChoiceResults(final GameController controller,final MagicGame game,final MagicPlayer player,final MagicSource source);
|
||||
|
|
Loading…
Reference in New Issue