Adjust FFG ratings to match EGF ones

This commit is contained in:
Claude Brisson
2024-01-23 13:39:50 +01:00
parent 2a733f7cdb
commit b7e2e418ef

View File

@@ -25,6 +25,8 @@ object FFGRatingsHandler: RatingsHandler(RatingsManager.Ratings.FFG) {
val rating = it["rating"]?.toString()?.toIntOrNull()
if (rating != null) {
it["rank"] = (rating/100).let { if (it < 0) "${-it}k" else "${it+1}d" }
// then adjust to match EGF ratings
it["rating"] = rating + 2050
}
}
}