I created a tic tac toe game where you plsy against the computer, however its too easy for the human player to win. how can i make it so that the computer wins all the time or ties the human player?


public int[] chooseMove(char symbol){
int[] move = new int[2];
int blockRow = 0;
int blockCol = 0;
int progressRow = 0;
int progressCol = 0;

for (int i=0; i < ticTacToe.length; i++){
for (int j=0; j < ticTacToe[i].length; j++){
if (ticTacToe[i][j] == '_'){
progressRow = i;
progressCol = j;
} else if (ticTacToe[i][j] != symbol){

} else {

}
}
}

if(blockRow != 0 || blockCol != 0){
move[0] = blockRow;
move[1] = blockCol;
} else {
move[0] = progressRow;
move[1] = progressCol;
}
return move;
}