泛型类型约束修正
This commit is contained in:
parent
0741d19b7f
commit
39dc61aef7
|
@ -1,7 +1,9 @@
|
||||||
package game
|
package game
|
||||||
|
|
||||||
|
import "github.com/kercylan98/minotaur/utils/generic"
|
||||||
|
|
||||||
// RankingList 排行榜
|
// RankingList 排行榜
|
||||||
type RankingList[CompetitorID comparable, Score comparable] interface {
|
type RankingList[CompetitorID comparable, Score generic.Ordered] interface {
|
||||||
// Competitor 声明排行榜竞争者
|
// Competitor 声明排行榜竞争者
|
||||||
// - 如果竞争者存在的情况下,会更新已有成绩,否则新增竞争者
|
// - 如果竞争者存在的情况下,会更新已有成绩,否则新增竞争者
|
||||||
Competitor(competitorId CompetitorID, score Score)
|
Competitor(competitorId CompetitorID, score Score)
|
||||||
|
|
Loading…
Reference in New Issue