RollDice (# of dice, # of sides) {
total = 0
for 1 = 1 to # of dice {
total = total + (rand() * # of sides) + 1
}
return total
}
I was wondering if someone had an idea on a better way to write this function to make the results more like real dice? Is this even possible to do? Is there maybe a better algorithm to generate the random number then whatever the one built in is?

New Topic/Question
Reply



MultiQuote





|