test test test

main
Jens 2024-05-02 11:26:21 +02:00
parent 1df77360a5
commit e40542a831
2 changed files with 60 additions and 0 deletions

21
Domain/Dice.java 100644
View File

@ -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;
}
}

39
Domain/Player.java 100644
View File

@ -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;
}
}