de.palmmedia.yahtzee.game.elements
Class Yahtzee

java.lang.Object
  extended by de.palmmedia.yahtzee.game.elements.Element
      extended by de.palmmedia.yahtzee.game.elements.OneKind
          extended by de.palmmedia.yahtzee.game.elements.Yahtzee

public class Yahtzee
extends OneKind

Element where all dices are equal.

Author:
Daniel Palme

Constructor Summary
Yahtzee(String name)
          Constructor.
 
Method Summary
protected  int calculateResult(Dice[] dices)
          Calculates the result of the given dices.
 
Methods inherited from class de.palmmedia.yahtzee.game.elements.OneKind
areDicesAllowed
 
Methods inherited from class de.palmmedia.yahtzee.game.elements.Element
calculate, doDicesFit, getName, getResult, hasResult, setDices, unsetDices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Yahtzee

public Yahtzee(String name)
Constructor.

Parameters:
name - The name.
Method Detail

calculateResult

protected int calculateResult(Dice[] dices)
Calculates the result of the given dices.

Overrides:
calculateResult in class OneKind
Parameters:
dices - The dices.
Returns:
The result.