Unbeatable tic-tac-toe