diff --git a/Domain/Dice.java b/Domain/Dice.java new file mode 100644 index 0000000..9690073 --- /dev/null +++ b/Domain/Dice.java @@ -0,0 +1,21 @@ +package Domain; + +import java.util.Random; + +public class Dice { + private int numberOfDice; + + public Dice(int numberOfDice){ + this.numberOfDice = numberOfDice; + } + + public int rand(int numberOfDice){ + Random random = new Random(); + numberOfDice = random.nextInt(6); + return numberOfDice; + } + + public int getAugenzahl(){ + return numberOfDice; + } +} diff --git a/Domain/Player.java b/Domain/Player.java new file mode 100644 index 0000000..7eb9d8c --- /dev/null +++ b/Domain/Player.java @@ -0,0 +1,39 @@ +package Domain; + +public class Player { + + private String name; + private int[] tabelle; + + public Player(String name){ + this.name = name; + tabelle = new int[17]; + } + + //counts all the + public int getSumOne(){ + int sum = 0; + for(int i = 0; i < 6; i++){ + sum += tabelle[i]; + } + return sum; + } + + public int getSumTwo(){ + int sum = 0; + for (int i = 7; i < 7; i++){ + sum += tabelle[i]; + } + return sum; + } + + public int getSum(){ + int sumOne = getSumOne(); + int sumTwo = getSumTwo(); + return sumOne += sumTwo; + } + + public String getName(){ + return name; + } +}