html5/javascript Tic-tac-toe