mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
merge fix
This commit is contained in:
parent
3b421de2e3
commit
f83c2bea4b
2 changed files with 3 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ public final class GameStateEvaluator2 {
|
|||
public static PlayerEvaluateScore evaluate(UUID playerId, Game game, boolean useCombatPermanentScore) {
|
||||
// TODO: add multi opponents support, so AI can take better actions
|
||||
Player player = game.getPlayer(playerId);
|
||||
// must find all leaved opponents too
|
||||
// must find all leaved opponents
|
||||
Player opponent = game.getPlayer(game.getOpponents(playerId, false).stream().findFirst().orElse(null));
|
||||
if (opponent == null) {
|
||||
return new PlayerEvaluateScore(playerId, WIN_GAME_SCORE);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ public class ActionSimulator {
|
|||
}
|
||||
|
||||
public int evaluateState() {
|
||||
Player opponent = game.getPlayer(game.getOpponents(player.getId(), true).stream().findFirst().orElse(null));
|
||||
// must find all leaved opponents
|
||||
Player opponent = game.getPlayer(game.getOpponents(player.getId(), false).stream().findFirst().orElse(null));
|
||||
if (opponent == null) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue