mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
moved score out of game
This commit is contained in:
@@ -17,9 +17,9 @@ public final class TicTacToeAI extends AI<TicTacToe> {
|
|||||||
|
|
||||||
if (legalMoves.length == 9) {
|
if (legalMoves.length == 9) {
|
||||||
return switch ((int)(Math.random() * 4)) {
|
return switch ((int)(Math.random() * 4)) {
|
||||||
case 1 -> legalMoves[2];
|
case 0 -> legalMoves[2];
|
||||||
case 2 -> legalMoves[6];
|
case 1 -> legalMoves[6];
|
||||||
case 3 -> legalMoves[8];
|
case 2 -> legalMoves[8];
|
||||||
default -> legalMoves[0];
|
default -> legalMoves[0];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user