0
Need help with tic-tac-toe game in java
This is what I have so far. Everything works, but it will not tell if anyone is a winner. It just keeps looping back to each player and once the board fills up, it asks to choose another number because no space is available. Also, my no space available output only works with player 1, not player 2. So, if player 1 chooses a spot that is taken, the program asks the player to choose another spot. When player 2 does the same thing, the program just asks player 2 to pick a spot, not the same prompt player 1 will get. Can someone help me figure out my mistakes?
5 Answers
0
i know...couldnt find the java button
0
thank you!!
- 1
the code should be here: https://code.sololearn.com/Wp1ql4f831Fx under JS
- 1
I've fixed some minor mistakes and it works quite fine! Huge problem is that SL doesn't 'wait' for the input, it will request all at once at the beginning, but that's not your problem.
Nice code!
- 1
Here is the fixed code:
https://code.sololearn.com/cf1m8Dt0wdux/?ref=app