mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
fixed turn skip bug
fixed end score bug now only shows legal and highlight moves when human
This commit is contained in:
@@ -8,6 +8,7 @@ public final class ReversiAI extends AI<Reversi> {
|
||||
public Move findBestMove(Reversi game, int depth) {
|
||||
Move[] moves = game.getLegalMoves();
|
||||
int inty = (int)(Math.random() * moves.length-.5f);
|
||||
if (moves.length == 0) return null;
|
||||
return moves[inty];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user