class Dice

Wraps the dice routines in a class. More...

Definition#include <dice.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


Detailed Description

Wraps the dice routines in a class.

Dice ()

Creates a set of 'null dice', which will always come up 0.

Dice (unsigned char number, unsigned char polygonNo, short bonus)

Creates a set of dice from the specification in the args.

Dice (unsigned char polyNo)

Creates a set of one die with the specified number of sides.

void setNoDice (unsigned char newNo)

Sets the number of dice

void setSides (unsigned char newSides)

Sets the number of sides on the dice

void setMod (short newMod)

Sets the modifier on the roll

int getNoDice ()

Gets the number of dice

int getSides ()

Gets the number of sides on the dice

int getMod ()

Gets the modifier on the roll

long roll ()

Rolls the dice represented by this object