unbeatable tictactoe app written in JS