12 Mar 2003 03:32:14 UTC
- Distribution: Games-Die
- Module version: 0.03
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (3 / 0 / 0)
- KwaliteeBus factor: 0
- License: unknown
- Activity24 month
- Download (3.1KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This versionJMUHLICH Jeremy Muhlich
Games::Die provides an object-oriented implementation of a die. The die may contain any number of sides, not just those for which a physical implementation is possible/feasible. You can create a 7-, 29-, or 341-sided die if the mood strikes you. There is no limit to the number of sides.
$six_sided = new Games::Die(6); $twenty_sided = new Games::Die(); $twenty_sided->sides(20); $result = $six_sided->roll() + $twenty_sided->roll();
Creates a new Die. Takes the number of sides.
If called without an argument, returns the number of sides the current die has. If called with a numerical argument, sets the number of sides.
Rolls the die and returns the number that came up.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 90:
You forgot a '=back' before '=head1'