feature(domain): Datenstruktur eines Highscores
Implementierung der Highscoredatenstruktur zur Nutzung durch den Highscoremanagerpull/3/head
parent
981547383f
commit
57147ae818
|
@ -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 + ")";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue