com.huyderman.javadice
Class DiceUtils
java.lang.Object
com.huyderman.javadice.DiceUtils
public class DiceUtils
- extends java.lang.Object
This class contains methods for rolling dice. This class utilizes the Random
class from java to generate random numbers, and can have methods for many
common die-rolling methods.
- Version:
- 1.2
- Author:
- Jo-Herman Haugholt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DROP_HIGH
public static final int DROP_HIGH
- See Also:
- Constant Field Values
DROP_LOW
public static final int DROP_LOW
- See Also:
- Constant Field Values
DiceUtils
public DiceUtils()
rollDiceArray
public int[] rollDiceArray(Die[] dies)
- Dice Array Roller
- Parameters:
dies
- TODOn
- Number of DicedieSides
- Number of sides on dicebonus
- Bonus to each dice
- Returns:
- Array of die Results
rollDiceArray
public int[] rollDiceArray(int n,
Die d)
rollDiceCollection
public void rollDiceCollection(java.util.Collection<Die> dice,
java.util.Collection<java.lang.Integer> results)
- Dice Collection Roller
- Parameters:
n
- Number of DicedieSides
- Number of sides on dicebonus
- Bonus on each dicec
- Collection Collection which the results (wrapped in an Integer
object) are to be added.
rollDiceDropHigh
public int rollDiceDropHigh(Die d,
int n,
int numberToDrop)
rollDiceDropLow
public int rollDiceDropLow(Die d,
int n,
int numberToDrop)
Copyright © 2002-2009 Huyderman Studios. All Rights Reserved.