Fix: remove old codes - best record

This commit is contained in:
2018-10-23 23:41:20 +09:00
parent f0dc660018
commit c7a5926b21
16 changed files with 47 additions and 401 deletions
+5 -5
View File
@@ -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;
},