feature(domain): Datenstruktur eines Highscores

Implementierung der Highscoredatenstruktur zur Nutzung durch den Highscoremanager
pull/3/head
dustineversmann 2025-01-06 22:25:13 +01:00
parent 981547383f
commit 57147ae818
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
package de.deversmann.domain;
public class HighscoreEntry {
private final String playerName;
private final long timeSeconds;
private final int errorCount;
public HighscoreEntry(String playerName, long timeSeconds, int errorCount) {
this.playerName = playerName;
this.timeSeconds = timeSeconds;
this.errorCount = errorCount;
}
public String getPlayerName() {
return playerName;
}
public long getTimeSeconds() {
return timeSeconds;
}
public int getErrorCount() {
return errorCount;
}
@Override
public String toString() {
return playerName + " - " + timeSeconds + "s (Fehler: " + errorCount + ")";
}
}