This is untested and doesn't account for when the wins are equal.