|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.palmmedia.yahtzee.game.elements.Element
de.palmmedia.yahtzee.game.elements.Number
public class Number
Element where dices have to be equal to a certain number.
Field Summary | |
---|---|
private int |
number
The number. |
Constructor Summary | |
---|---|
Number(String name,
int number)
Constructor. |
Method Summary | |
---|---|
boolean |
areDicesAllowed(Dice[] dices)
Determines whether the dices can be applied to the element. |
protected int |
calculateResult(Dice[] dices)
Calculates the result of the given dices. |
boolean |
doDicesFit(Dice[] dices)
Determines whether the dices fit. |
Methods inherited from class de.palmmedia.yahtzee.game.elements.Element |
---|
calculate, getName, getResult, hasResult, setDices, unsetDices |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int number
Constructor Detail |
---|
public Number(String name, int number)
name
- The name.number
- The number.Method Detail |
---|
public boolean doDicesFit(Dice[] dices)
doDicesFit
in class Element
dices
- The dices.
public boolean areDicesAllowed(Dice[] dices)
areDicesAllowed
in class Element
dices
- The dices.
protected int calculateResult(Dice[] dices)
calculateResult
in class Element
dices
- The dices.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |