public class Die
extends java.lang.Object
Constructor and Description |
---|
Die()
Default constructor creates a 6-sided die.
|
Die(int aNumSides)
This constructor takes in a single integer value and create a die with
that number of sides.
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentValue()
Getter for the number of sides on the die.
|
int |
getNumOfSides()
Getter for the number of sides on the die.
|
int |
roll()
Rolls the die to get a random value.
|
public Die()
public Die(int aNumSides)
aNumSides
- Number of sides to create on the die.public int getNumOfSides()
public int getCurrentValue()
public int roll()