Fix: remove old codes - best record
This commit is contained in:
@@ -114,24 +114,24 @@ var MenuTypingTest = {
|
||||
return false;
|
||||
},
|
||||
|
||||
getBestRecord: function(jsonList, appID) {
|
||||
getAppHighestRecord: function(jsonList, appID) {
|
||||
var count = jsonList.length; // Object.keys(jsonList).length;
|
||||
|
||||
for(var i = 0; i < count; i++) {
|
||||
if(jsonList[i].AppID === appID)
|
||||
return jsonList[i].BestRecord;
|
||||
return jsonList[i].AppHighestRecord;
|
||||
}
|
||||
|
||||
return 0;
|
||||
},
|
||||
|
||||
getIconImage: function(jsonList, appID) {
|
||||
var bestRecord = this.getBestRecord(jsonList, appID);
|
||||
var appHighestRecord = this.getAppHighestRecord(jsonList, appID);
|
||||
|
||||
if(bestRecord === 0)
|
||||
if(appHighestRecord === 0)
|
||||
return "snail_shadow";
|
||||
|
||||
var animalLevel = Animal.animalLevelIDByRecord(bestRecord, Animal.TYPE_TEST);
|
||||
var animalLevel = Animal.animalLevelIDByRecord(appHighestRecord, Animal.TYPE_TEST);
|
||||
return Animal.SPECIES_DATA[animalLevel].species + Animal.SPRITE_NAMES.icon;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user