diff --git a/src/main/java/controls/BotIntelligence.java b/src/main/java/controls/BotIntelligence.java index 5623208..1435452 100644 --- a/src/main/java/controls/BotIntelligence.java +++ b/src/main/java/controls/BotIntelligence.java @@ -4,6 +4,7 @@ import interfaces.IBotBehavior; import java.util.*; +import java.util.stream.Collectors; import static views.Constants.DECK_COUNT; @@ -20,8 +21,8 @@ var candidates = new ArrayList(); for(int i=0;i x.getKey()).toList()); - candidates.removeAll(iAttack.getMyHands().stream().filter(x -> x.getValue()).map(x -> x.getKey()).toList()); + candidates.removeAll(iAttack.getOpponentHands().stream().map(x -> x.getKey()).collect(Collectors.toList())); + candidates.removeAll(iAttack.getMyHands().stream().filter(x -> x.getValue()).map(x -> x.getKey()).collect(Collectors.toList())); return candidates; }