Re: TIB: "Weighting" Dice on TI-85


[Prev][Next][Index][Thread]

Re: TIB: "Weighting" Dice on TI-85




In a message dated 98-01-26 01:44:40 EST, you write:

> Is there anyway I could apply something like this to a user cutstomizable
>  die roll?  My program allows the user to enter the number of dice and then
>  the number of sides per die, then rolls it from those arguments.

Try this formula:
:int(rand*sides-2)+int(rand*2+1)+1->die1
it isn't as accurate as defining ranges, but this will weight the die in favor
of higher numbers.  I assume that the numbers start with 1, not 0.  Depending
on how you store the die values, you could put this into a for loop for the
number of die.  I'm not sure what you want to do with them, so i'll just leave
it like this.
 Paul Chase II