Fix: App ranking TDD
This commit is contained in:
@@ -23,21 +23,36 @@ RankingRecordManager.prototype.getCount = function() {
|
||||
}
|
||||
|
||||
RankingRecordManager.prototype.getAt = function(index) {
|
||||
if(typeof(this.rankingRecords[index]) == "undefined")
|
||||
return null;
|
||||
|
||||
return this.rankingRecords[index];
|
||||
}
|
||||
|
||||
RankingRecordManager.prototype.getRankAt = function(index) {
|
||||
if(typeof(this.rankingRecords[index]) == "undefined")
|
||||
return -1;
|
||||
|
||||
return this.rankingRecords[index].rank;
|
||||
}
|
||||
|
||||
RankingRecordManager.prototype.getPlayerIDAt = function(index) {
|
||||
if(typeof(this.rankingRecords[index]) == "undefined")
|
||||
return -1;
|
||||
|
||||
return this.rankingRecords[index].playerID;
|
||||
}
|
||||
|
||||
RankingRecordManager.prototype.getPlayerNameAt = function(index) {
|
||||
if(typeof(this.rankingRecords[index]) == "undefined")
|
||||
return "no data";
|
||||
|
||||
return this.rankingRecords[index].playerName;
|
||||
}
|
||||
|
||||
RankingRecordManager.prototype.getBestRecordAt = function(index) {
|
||||
if(typeof(this.rankingRecords[index]) == "undefined")
|
||||
return -1;
|
||||
|
||||
return this.rankingRecords[index].bestRecord;
|
||||
}
|
||||
Reference in New Issue
Block a user