Gewinner editing
parent
27d14e0c67
commit
375b322573
|
@ -79,6 +79,7 @@ public class KniffelSpiel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
displayFinalScore();
|
displayFinalScore();
|
||||||
|
displayFinalScoreGewinner();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,7 +139,7 @@ public class KniffelSpiel {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private int calculateCategoryScore(int categoryIndex, Würfel würfel) {
|
private int calculateCategoryScore(int categoryIndex, Würfel würfel) {
|
||||||
return spiel.calculateKategorieScore(categoryIndex, würfel);
|
return spiel.calculateKategorieScore(categoryIndex, würfel);
|
||||||
}
|
}
|
||||||
|
@ -181,6 +182,11 @@ public class KniffelSpiel {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void displayFinalScoreGewinner() {
|
||||||
|
Spieler winner = spiel.determineWinner();
|
||||||
|
System.out.println("Winner: Player " + winner.getNumber() + " with total score of " + winner.getTotalScore());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<String> getHighscores() {
|
public List<String> getHighscores() {
|
||||||
|
|
Loading…
Reference in New Issue