Originally posted by Bort
Reposting because you didn't get to my Q, steel:
Originally posted by Bort
What if I put in something that's going to give more fractional type results, like 7%, or 33%? What is the formula you're applying, and do you floor, round, ceiling?
Sorry, missed you. You really need to get a higher profile if you want to survive in GLB
This is real simple way of doing it, and it is close enough for horse shoes and hand gernades. Everything input has a counter, and every output has a ticker every time it occurs. Ignore the first roll. After the first roll, each output ticker is divided by the play counter. If the percentage is high than the set percent, than that output is excluded for that roll. It keeps doing that check every time a roll is made.
Input
play A - 53%
play B - 17%
play C - 30%
Roll 1
play A occurs
Roll 2
play B occurs
Roll 3
play B is excluded from the roll as its ticker value / input counter is .33
Roll 4
play B is still excluded at .25
Roll 5
play B is still excluded at .20
Roll 6
play B is back at .1666
If you map that out at over a number of rolls, you'll get rough percentages. The ordered list way would be more coding.
Reposting because you didn't get to my Q, steel:
Originally posted by Bort
What if I put in something that's going to give more fractional type results, like 7%, or 33%? What is the formula you're applying, and do you floor, round, ceiling?
Sorry, missed you. You really need to get a higher profile if you want to survive in GLB
This is real simple way of doing it, and it is close enough for horse shoes and hand gernades. Everything input has a counter, and every output has a ticker every time it occurs. Ignore the first roll. After the first roll, each output ticker is divided by the play counter. If the percentage is high than the set percent, than that output is excluded for that roll. It keeps doing that check every time a roll is made.
Input
play A - 53%
play B - 17%
play C - 30%
Roll 1
play A occurs
Roll 2
play B occurs
Roll 3
play B is excluded from the roll as its ticker value / input counter is .33
Roll 4
play B is still excluded at .25
Roll 5
play B is still excluded at .20
Roll 6
play B is back at .1666
If you map that out at over a number of rolls, you'll get rough percentages. The ordered list way would be more coding.
Edited by steellithium on Jan 12, 2010 19:11:49