NAME

Games::Die::Dice

DESCRIPTION

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

SYNOPSIS

$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();

CONSTRUCTOR

  • new()

    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.

PUBLIC METHODS

  • roll()

    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).

AUTHORS

Andrew Burke (burke@bitflood.org)
Jeremy Muhlich (jmuhlich@bitflood.org)

1 POD Error

The following errors were encountered while parsing the POD:

Around line 98:

You forgot a '=back' before '=head1'