NAME
Games::Die::Dice::Result - what you get when you roll some dice
VERSION
version 0.07_01
$Id: Result.pm,v 1.1 2004/10/19 03:52:28 rjbs Exp $
SYNOPSIS
push @results, $dice->roll for (1 .. 10);
@results = sort { $_->value <=> $_->value } @results;
print "best roll: ", join(' ', sort $results[0]->rolls), "\n";
print "worst roll: ", join(' ', sort $results[9]->rolls), "\n";
DESCRIPTION
Result objects are returned when the roll
method is called on a Game::Die::Dice set.
METHODS
new
This method creates a new result set. You shouldn't need to use it outside of the Dice class. It is given the named argument rolls
, a reference to an array of die results. The argument adjust
is optional, and specifies a number to be added to the totals.
rolls
This returns a list of the die results.
total
This returns the total of the rolls, plus the adjustment.
value
In list context, this calls rolls
and calls total
otherwise.
AUTHOR
Ricardo SIGNES, <rjbs@cpan.org
>
BUGS
Please report any bugs or feature requests to bug-games-die-dice-results@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
COPYRIGHT
Copyright 2004, Ricardo SIGNES.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.