[Refactor] Init files Encoding & Refresh rating

- Now initial files can be other encoding types which are supported by JSON module
- Code refactor for refreshing all scores' rating
This commit is contained in:
Lost-MSth
2022-11-24 21:40:44 +08:00
parent e3d5c19569
commit 84b0e869a5
9 changed files with 81 additions and 164 deletions

View File

@@ -103,7 +103,7 @@ class Score:
@staticmethod
def calculate_rating(defnum: int, score: int) -> float:
'''计算rating谱面定数小于等于0视为Unrank这里的defnum = Chart const'''
'''计算rating谱面定数小于等于0视为Unrank返回值会为-1这里的defnum = Chart const'''
if not defnum or defnum <= 0:
# 谱面没定数或者定数小于等于0被视作Unrank
return -1