Package Files

Class Dice

java.lang.Object
Files.Dice

public class Dice extends Object
  • Constructor Details

    • Dice

      public Dice()
  • Method Details

    • setSides

      public static void setSides(Integer sides)
      Constructs dice object with specific number of sides
      Parameters:
      sides - number of sides for the dice object
    • rollDice

      public static Integer rollDice()
      Method to roll the dice with the specific number of sides
      Returns:
      Integer result of the dice roll