Fix Random.nextInt(int) in Random.java
This commit is contained in:
parent
de37c534c0
commit
1ffc7ded74
@ -6,8 +6,8 @@ public class Random extends Player{
|
||||
|
||||
@Override
|
||||
public Pair<Integer,Integer> chooseMove() {
|
||||
Random rand = new Random();
|
||||
int index = validMoves().get(rand.nextInt(validMoves().size()));
|
||||
return validMoves().get(index);
|
||||
java.util.Random rand = new java.util.Random();
|
||||
// Pair<Integer, Integer> index = validMoves().get(rand.nextInt(validMoves().size()));
|
||||
return validMoves().get(rand.nextInt(validMoves().size()));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user