Hi everybody,
I am making a tic-tac-toe game where should be payable by two humans, the game should display all the current player turn....my problem is in the logic, when i set the first player=true; .....the output is right for the first player, but not for the second one, or when i set the value of the second player to true, i got the problem in the first player output ej
Any help would be appreciate.
I am making a tic-tac-toe game where should be payable by two humans, the game should display all the current player turn....my problem is in the logic, when i set the first player=true; .....the output is right for the first player, but not for the second one, or when i set the value of the second player to true, i got the problem in the first player output ej
Code:
function players_turn()
{
turn1=false;
turn2=false;
if((turn1==false)&&(turn2==false))
{
alert("First player is your turn");
turn1=true;
alert("Second player is your turn");
turn2=true;
}
}// I know my problem is in here.
Comment