JS for playing and usually prevailing in tic-tac-toe