v0.2.3: rankings page can now contain up to 10 records (+1 for most recent), looks a bit clumped up atm.

This commit is contained in:
Evan Debenham
2014-12-18 02:24:30 -05:00
parent a3c9dc77a1
commit e4951449f4
2 changed files with 21 additions and 13 deletions
@@ -35,7 +35,7 @@ public enum Rankings {
INSTANCE;
public static final int TABLE_SIZE = 6;
public static final int TABLE_SIZE = 11;
public static final String RANKINGS_FILE = "rankings.dat";
public static final String DETAILS_FILE = "game_%d.dat";
@@ -70,7 +70,7 @@ public enum Rankings {
lastRecord = records.indexOf( rec );
int size = records.size();
if (size > TABLE_SIZE) {
while (size > TABLE_SIZE) {
Record removedGame;
if (lastRecord == size - 1) {
@@ -83,6 +83,8 @@ public enum Rankings {
if (removedGame.gameFile.length() > 0) {
Game.instance.deleteFile( removedGame.gameFile );
}
size = records.size();
}
totalNumber++;