0
Tic-Tac-Toe in Java
So basically I just need help on getting John and Jill's turn to input a number appropriately so that no squares can be overwrite, meaning no X can mark over an O. Here is my code: https://code.sololearn.com/c66riZU6U4Hr
1 Réponse
+ 1
There are two ways to avoid duplicated position
One way is you have an array storing all the locations first, each time player place a piece, you check if the position is filled, if not, you take that position out of array,
Another way is just the opposite, your array begin empty and stores locations when players play