22 lines
413 B
Java
22 lines
413 B
Java
package Domain;
|
|
|
|
import java.util.Random;
|
|
|
|
public class Dice {
|
|
private int numberOfDice;
|
|
|
|
public Dice(int numberOfDice){
|
|
this.numberOfDice = numberOfDice;
|
|
}
|
|
|
|
public int rollDice(int numberOfDice){
|
|
Random random = new Random();
|
|
numberOfDice = random.nextInt(6);
|
|
return numberOfDice + 1;
|
|
}
|
|
|
|
public int getAugenzahl(){
|
|
return numberOfDice;
|
|
}
|
|
}
|