Durchschnitszeit-Funktion verbessert
parent
d88e35b4e2
commit
ffbd2dab10
|
@ -1,4 +1,7 @@
|
|||
Ioana,25,Hitori4x4_leicht.csv,0
|
||||
test,22,Hitori4x4_leicht.csv,0
|
||||
Test2,72,Hitori5x5_leicht.csv,0
|
||||
Test3,100,Hitori8x8_medium.csv,0
|
||||
Test3,100,Hitori8x8_medium.csv,0
|
||||
Test4,200,Hitori15x15_medium.csv,10
|
||||
IOANA VERSUCH 156,105,Hitori5x5_leicht.csv,0
|
||||
IOANA VERSUCH 439,44,Hitori5x5_leicht.csv,0
|
||||
|
|
|
@ -71,13 +71,14 @@ public class HighscoreDialog extends JDialog {
|
|||
|
||||
int rank = 1;
|
||||
for (HighscoreManager.Highscore highscore : highscores) {
|
||||
String bName = highscore.getBoardName().replaceAll("\\.csv$", ""); // .csv entfernen
|
||||
double averageTime = averageTimes.getOrDefault(highscore.getBoardName(), 0.0);
|
||||
tableModel.addRow(new Object[]{
|
||||
rank++, // Platzierung
|
||||
highscore.getPlayerName(), // Name
|
||||
highscore.getScore(), // Punkte
|
||||
highscore.getErrors(), //Errors
|
||||
highscore.getBoardName(), // Spielfeld
|
||||
bName, // Spielfeld
|
||||
String.format("%.2f", averageTime) // Durchschnittszeit
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue