org.haphazard.dice
Class DicePool

java.lang.Object
  extended byorg.haphazard.dice.DicePool

public class DicePool
extends java.lang.Object

A class that rolls several dice of the same sort


Constructor Summary
DicePool(boolean wildDie)
          Creates a new instance of DicePool
 
Method Summary
 int getLastResult()
          Gets the last rolled result
 int getWildDieStatus()
          Gets the wild die status (how many times it has come up)
 int roll(int noDices, int sides)
          Rolls the dicepool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DicePool

public DicePool(boolean wildDie)
Creates a new instance of DicePool

Parameters:
wildDie - If the pool uses a wild die or not
Method Detail

roll

public int roll(int noDices,
                int sides)
Rolls the dicepool

Parameters:
noDices - The number of dices to roll
sides - The number of sides on each of the dices
Returns:
The result of the roll

getWildDieStatus

public int getWildDieStatus()
Gets the wild die status (how many times it has come up)

Returns:
The number of times the wilddie has come up (-1 if botched)

getLastResult

public int getLastResult()
Gets the last rolled result

Returns:
The last rolled result