I was trying to start a small piece of code that is supposed to roll 5 dice. 4 of the dice are supposed to have the numbers from dietype1 (2,3,4,5,6,10) and the 5th is supposed to have the numbers from dietype2 (1,2,4,5,6,10). I am lost on how to execute a random selection. Some of the examples I have looked up use Random or some other method that I am not familiar with.
I also had a question about the way I set up the two different types of dice. Would using a list be the easiest choice to go with or would an ArrayList make more sense?
Any input on how to guide me or set up the lists better is greatly appreciated!
Here's what I have so far...
public class inc1{
private int die1;
private int die2;
private int die3;
private int die4;
private int die5;
List<Integer> dietype1 = Arrays.asList(2, 3, 4, 5, 6, 10);
List<Integer> dietype2 = Arrays.asList(1, 2, 4, 5, 6, 10);
public void roll(){
}
public static void main(String[] args){
}
}