Gewinner editing

main
danai 2024-05-07 00:34:32 +02:00
parent 27d14e0c67
commit 375b322573
1 changed files with 7 additions and 1 deletions

View File

@ -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() {