Class DiceSet

Object
DiceSet

public class DiceSet extends Object
A simple class that handles rolling of Dice.
  • Constructor Details

    • DiceSet

      public DiceSet()
  • Method Details

    • roll

      public int roll(DiceType diceType)
      Rolls a dice based on DiceType. D4 means 1-4, D6 means 1d6, and so on until D20 means 1-20. Always returns whole numbers between 1 and DiceType
      Parameters:
      diceType - the DiceType to roll n
      Returns:
      an int value between 1 and DiceType/sides