Also use this for easy debugging:
System.out.println("1 "+java.util.Arrays.deepToString(board));
Add lots of them. Change the "1" to be unique in each println.
Type: Posts; User: Norm
Also use this for easy debugging:
System.out.println("1 "+java.util.Arrays.deepToString(board));
Add lots of them. Change the "1" to be unique in each println.
Try some standalone testing of the method.
Create an array with a winning position and call the checkForWinner() method and print out what it returns.
Try it with lots of different winning...
The Move methods should test if the square is occupied before making the move.
Where is the beginning of the loop that is being repeated?
Where is a winning position tested for?
Are there two players or does the computer play one side?
Please explain what that means? Are you trying to get input from the user? The Scanner class has methods that will read user input from the console.