matthew.moss.coder
1/6/2006 7:38:00 PM
Sticking with typical integer division (ie, round-down) is fine.
If you wanted to extend the syntax to support round-up division (using '\'
perhaps) or other options, feel free. Extra credit.
A lot of extra credit if you add syntax to support some RPGs/home rules
where you might want 3d6, but you'll actually roll 4d6 and toss the lowest.
On 1/6/06, Jacob Fugal <lukfugl@gmail.com> wrote:
>
> On 1/6/06, Ruby Quiz <james@grayproductions.net> wrote:
> > Or, for something more complicated:
> >
> > > roll.rb "(5d5-4)d(16/d4)+3"
> > 31
>
> I assume integer arithmetic? So if, for example, a 3 comes up on your
> d4, 16/d4 would be 5?
>
> Jacob Fugal
>
>