Now that would be an elegant solution.
Originally posted by snoopy369
Um, the most efficient way is the way I had it originally. Just have each difficulty with an xml option "iNumBad" and order the goodie results by good->bad, then have the scout generate a num from iNumBad+1 to 20 instead of from 1 to 20...
One roll, guaranteed good result
Um, the most efficient way is the way I had it originally. Just have each difficulty with an xml option "iNumBad" and order the goodie results by good->bad, then have the scout generate a num from iNumBad+1 to 20 instead of from 1 to 20...
One roll, guaranteed good result


That code is quite inefficient (and nonrandom, if i'm reading it right) ... even assuming we have to accept 'excluded list' essentially we have two options: (Excuse the code, I don't use C normally so treat this as pseudocode, particlularly "is invalid" clearly needs a meaningful check)
Comment