An algorithm to generate tournament score sequences