mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 02:44:50 +00:00
Merge remote-tracking branch 'origin/Development' into Development
# Conflicts: # app/src/main/java/org/toop/app/game/ReversiGame.java # app/src/main/java/org/toop/app/view/views/GameView.java
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