Browse Source

Add Fix return value

AIPlayer
FelixKrull 3 years ago
parent
commit
d116f6df53
  1. 3
      src/main/java/AIPlayer.java

3
src/main/java/AIPlayer.java

@ -8,6 +8,7 @@ public class AIPlayer extends Player{
@Override @Override
public int choose(ArrayList<Integer> usableFigures) { public int choose(ArrayList<Integer> usableFigures) {
return (int) (Math.random() * usableFigures.size());
int res = (int) ((Math.random() * usableFigures.size()));
return usableFigures.get(res);
} }
} }
Loading…
Cancel
Save