Tictactoe on javascript with server sent events