JavaScript And TicTacToe Issue

Greetings everyone,

I have been stuck with my TTT application for two days now and have tried all the chat rooms and finally I am trying the forum. I am trying to enable PlayerVPlayer mode, however when I try to place a symbol it seems like the computer plays itself, even though the compAI() function has been commented out. If anyone is able to spot the issue, I would be very grateful. Thank you in advance.

Kind Regards, N

I’ve fixed the issue and the problem seems be your deceptive way of indenting if statements; indent your if clauses consistently.

The bug is in your place function’s control flow of else if clause.

1 Like

Ok, gunhoo93, please bear with me while I try to find the error. Yeah it’s a bit messy since I find codepen so tedious to work with.

Thank you so much, wow so simple and people haven’t been able to find it! You sir are a master! Thank you so much! :cookie: for you!