|
@ -21,10 +21,10 @@ public class AIHard implements TicTacToeAI { |
|
|
char[][] board = gl.getBoard(); |
|
|
char[][] board = gl.getBoard(); |
|
|
for (char[] row : board) { |
|
|
for (char[] row : board) { |
|
|
for (char field : row) { |
|
|
for (char field : row) { |
|
|
emptyBoard &= field == '-'; |
|
|
|
|
|
|
|
|
emptyBoard &= field == EMPTY_CHAR; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (emptyBoard) { |
|
|
|
|
|
|
|
|
if (emptyBoard || board[1][1] == EMPTY_CHAR) { |
|
|
gl.setField(1, 1, AI_CHAR); |
|
|
gl.setField(1, 1, AI_CHAR); |
|
|
} else { |
|
|
} else { |
|
|
gl.setField(0, 0, AI_CHAR); |
|
|
gl.setField(0, 0, AI_CHAR); |
|
|