Tic Tac Toe solver