net.sourceforge.simplegamenet.dice
Class DiceSingle

java.lang.Object
  extended bynet.sourceforge.simplegamenet.dice.DiceSingle
All Implemented Interfaces:
Serializable

public class DiceSingle
extends Object
implements Serializable

This class has the value of a dice and knows whether the dice has been held or not.

See Also:
Serialized Form

Constructor Summary
DiceSingle(int diceValue)
          Initialises an instance of DiceSingle with a certain value for the dice
 
Method Summary
 int getDiceValue()
          Gets the value of the dice.
 boolean isDiceHeld()
          Checks if the dice has been held.
 void setDiceHeld(boolean holdDice)
          Sets whether the dice has been held or not.
 void setDiceValue(int diceValue)
          Sets the value of the dice.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiceSingle

public DiceSingle(int diceValue)
Initialises an instance of DiceSingle with a certain value for the dice

Parameters:
diceValue - The value of the dice.
Method Detail

setDiceHeld

public void setDiceHeld(boolean holdDice)
Sets whether the dice has been held or not.

Parameters:
holdDice - A boolean that tells if the dice is held.

isDiceHeld

public boolean isDiceHeld()
Checks if the dice has been held.

Returns:
Returns true if the dice is held.

getDiceValue

public int getDiceValue()
Gets the value of the dice.

Returns:
Returns an int with the value of the dice.

setDiceValue

public void setDiceValue(int diceValue)
Sets the value of the dice.

Parameters:
diceValue - The value of the dice.


Copyright © 2003-2004 The 3 Belgians. All Rights Reserved.