[TIB] New Dice roller version!


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

[TIB] New Dice roller version!



Thanks for all the feedback and suggestions, I made a couple modifications 
and had a much better result. The code is cleaner, shorter, and faster! 
Here goes:

------------------

ClLCD
Input "# of dice: ",D
Input "# to succeed: ",N
0->S
ClLCD
randInt(1,6,D)->lRL
sum (lRL>=N)->S
Disp S
Outpt(1,1,"Dice:    Successes:"
Outpt(2,1,lRL

------------------
[clear screen]
# of dice: (enter 15)
# to succeed: (enter 4)
[clear screen]
Dice:    Successes: 8
{3,3,6,4,6,3,1,5,5,3,
4,4,3,6,2}
-----------------

Note that the 'Done." is hidden since the output overwrites it :] This is 
perfect for my needs and elegantly written. Thankyou!

<EOL>
Tib




Follow-Ups: References: