
Games::Die::Dice

Games::Die::Dice provides a union of any number of Games::Die objects.

$four_eight_ten = new Games::Die::Dice(4, 8, 10);
$pair_of_eights = new Games::Die::Dice('2d8');
$result = $four_eight_ten->roll() + $pair_of_eights->roll();

Creates a new set of Dice. Takes a list containing the number of sides of each die in the set, or a single "Dungeons and Dragons"-style specification such as "2d8" or "6d20+2". The d may be upper- or lower-case, and the modifier may be a positive or negative integer.

Rolls each die in the set. In scalar context, returns the sum. In list context, returns the list of values that came up on each die (and also the adjust value if specified).
