AI: fixed computer's errors if all players quit the game;

This commit is contained in:
Oleg Agafonov 2021-07-24 05:52:02 +04:00
parent d41ccd11bc
commit c1db466d05
4 changed files with 16 additions and 4 deletions

View file

@ -376,7 +376,7 @@ public final class SystemUtil {
// 3. system commands
if (runGroup.isSpecialCommand) {
Player opponent = game.getPlayer(game.getOpponents(feedbackPlayer.getId()).iterator().next());
Player opponent = game.getPlayer(game.getOpponents(feedbackPlayer.getId()).stream().findFirst().orElse(null));
String info;
switch (runGroup.name) {