public class Die
Die class simulates a die object.
Field Summary | |
---|---|
private int |
face
|
Constructor Summary | |
---|---|
Die()
Constructs a new die object, initializing face to a random value. |
Method Summary | |
---|---|
int |
getFace()
Gets the current face value of the die. |
int |
roll()
Simulates the roll of the die. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int face
Constructor Detail |
---|
public Die()
Method Detail |
---|
public int roll()
public int getFace()