diff --git a/src/main/java/AIPlayer.java b/src/main/java/AIPlayer.java index f6aa6cb..4e8fe36 100644 --- a/src/main/java/AIPlayer.java +++ b/src/main/java/AIPlayer.java @@ -8,6 +8,7 @@ public class AIPlayer extends Player{ @Override public int choose(ArrayList usableFigures) { - return (int) (Math.random() * usableFigures.size()); + int res = (int) ((Math.random() * usableFigures.size())); + return usableFigures.get(res); } }