This commit is contained in:
Tim Tersch 2020-08-31 08:46:53 +02:00
parent f66878689e
commit e96ae83b7e
1 changed files with 7 additions and 2 deletions

View File

@ -68,8 +68,13 @@ public class Arrays {
* @see Wuerfel#getAugenzahl()
*/
public int diceSum( Wuerfel[] pArray ) {
// TODO: implementieren
return 0;
int sum = 0;
for (Wuerfel w : pArray) {
if (w != null) {
sum += w.getAugenzahl();
}
}
return sum;
}
/**