mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Fixed a problem with AI opponent selection,
This commit is contained in:
parent
72cadf286c
commit
603e625d8d
1 changed files with 1 additions and 1 deletions
|
@ -2250,7 +2250,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
* @return
|
||||
*/
|
||||
private UUID getRandomOpponent(UUID abilityControllerId, Game game) {
|
||||
UUID randomOpponentId = game.getOpponents(abilityControllerId).iterator().next();
|
||||
UUID randomOpponentId = null;
|
||||
Set<UUID> opponents = game.getOpponents(abilityControllerId);
|
||||
if (opponents.size() > 1) {
|
||||
int rand = RandomUtil.nextInt(opponents.size());
|
||||
|
|
Loading…
Reference in a new issue