package domain; import java.util.Random; public class Dice { private int amountSides; public Dice(int amountSides){ this.amountSides = amountSides; } public int roll(){ Random rand = new Random(); return (rand.nextInt(amountSides) + 1); } }