排行榜GetAllCompetitor改为按照排名的有序数组
This commit is contained in:
parent
80f8ff91ba
commit
791b939b71
|
@ -143,7 +143,11 @@ func (slf *RankingList[CompetitorID, Score]) GetScore(competitorId CompetitorID)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (slf *RankingList[CompetitorID, Score]) GetAllCompetitor() []CompetitorID {
|
func (slf *RankingList[CompetitorID, Score]) GetAllCompetitor() []CompetitorID {
|
||||||
return slf.competitors.Keys()
|
var result []CompetitorID
|
||||||
|
for _, data := range slf.scores {
|
||||||
|
result = append(result, data[0])
|
||||||
|
}
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
func (slf *RankingList[CompetitorID, Score]) Clear() {
|
func (slf *RankingList[CompetitorID, Score]) Clear() {
|
||||||
|
|
Loading…
Reference in New Issue