Yatzy/Domain/Yatzy_Sheet.java

28 lines
531 B
Java
Raw Normal View History

2024-05-03 12:22:01 +02:00
package Domain;
public class Yatzy_Sheet {
private int[] tabelle;
//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 < 17; i++){
sum += tabelle[i];
}
return sum;
}
public int getSum(){
int sumOne = getSumOne();
int sumTwo = getSumTwo();
return sumOne += sumTwo;
}
}