Editing class

main
danai 2024-05-07 00:21:50 +02:00
parent f39013c948
commit 99f9aab7e3
1 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,17 @@ public class Spieler {
} }
public boolean hasUnusedCategories(Kategorie[] categories) {
for (int i = 0; i < scores.length; i++) {
if (scores[i] == 0 && categories[i] != null) {
return true; // Eine ungenutzte Kategorie gefunden
}
}
return false; // Alle Kategorien benutzt oder fehlend
}
public void resetScore() { public void resetScore() {
for (int i = 0; i < scores.length; i++) { for (int i = 0; i < scores.length; i++) {
scores[i] = 0; scores[i] = 0;