|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
de.palmmedia.yahtzee.game.Dice
public class Dice
Represents a dice.
Field Summary | |
---|---|
private boolean |
locked
Determines whether the dice is locked. |
private int |
value
The value. |
Constructor Summary | |
---|---|
Dice()
Constructor. |
Method Summary | |
---|---|
int |
getValue()
Gets the value. |
boolean |
hasChanged()
|
boolean |
isLocked()
Determines whether the dice is locked. |
void |
roll()
Rolls the dice if it is not locked. |
void |
setLocked(boolean value)
Locks the dice. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int value
private boolean locked
Constructor Detail |
---|
public Dice()
Method Detail |
---|
public int getValue()
public boolean isLocked()
public void setLocked(boolean value)
value
- The locked state.public void roll()
public boolean hasChanged()
hasChanged
in class Observable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |