Fix: print ranking list with my rank
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
class RankingRecord {
|
||||
|
||||
constructor(rank, userName, score) {
|
||||
constructor(rank, userID, userName, score) {
|
||||
this.rank = rank;
|
||||
this.userID = userID;
|
||||
this.userName = userName;
|
||||
this.score = score;
|
||||
}
|
||||
@@ -35,6 +36,10 @@ class RankingRecordManager {
|
||||
return this.rankingRecords[index].rank;
|
||||
}
|
||||
|
||||
getUserIDAt(index) {
|
||||
return this.rankingRecords[index].userID;
|
||||
}
|
||||
|
||||
getUserNameAt(index) {
|
||||
return this.rankingRecords[index].userName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user