de.palmmedia.yahtzee.game.elements
Class SmallStraight

java.lang.Object
  extended by de.palmmedia.yahtzee.game.elements.Element
      extended by de.palmmedia.yahtzee.game.elements.Straight
          extended by de.palmmedia.yahtzee.game.elements.SmallStraight

public class SmallStraight
extends Straight

Straight with 4 dices in a row.

Author:
Daniel Palme

Constructor Summary
SmallStraight(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.Straight
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

SmallStraight

public SmallStraight(String name)
Constructor.

Parameters:
name - The name.
Method Detail

calculateResult

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

Specified by:
calculateResult in class Element
Parameters:
dices - The dices.
Returns:
The result.