Hey, this program is a game where you try to beat CPU at a Tic Tac Toe game. Everything is compiling, but there seems to be a problem because the turn never goes to CPU, instead the program keeps outputting Player 1's turn. Any suggestions?
Sorry btw if the code is a little too long, I'm still in the process of simplifying it.
If I were to put my first move in 2 (X), then computer puts in 1 (0) then I put my 2nd move in 3(X), the CPUMove() function will see 2 and 3 are the same and attempt to put O in position 1 regardless if its taken or not.
Just try making your first move on 2, then 3, computer will see 2 and 3 filled regardless of which player put them there and try to put X in position 1 which was filled by player 2 (CPU).