Javascript tictactoe