From 43ca7b3025913c47f5a99b0f4a457a3b8d6a453d Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 23 Apr 2021 11:49:59 +0200 Subject: score works again now :tada: --- api/events.py | 1 - api/rating.py | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'api') diff --git a/api/events.py b/api/events.py index 72ccb4d..8fd4c85 100644 --- a/api/events.py +++ b/api/events.py @@ -9,4 +9,3 @@ from hierarchy import io_auth_required def connect(data, user_id): if not user_id: return join_room("user-" + user_id) - diff --git a/api/rating.py b/api/rating.py index 479664a..ebda921 100644 --- a/api/rating.py +++ b/api/rating.py @@ -42,7 +42,9 @@ def get_rating(user_id): "l": -1, "d": 0 }[game[2]] - for opponent in counted_opponents: - # apply the cool curve to the sum score and add to the base score of 400 - score += rating_v1(counted_opponents.get(opponent)) + + for opponent in counted_opponents: + # apply the cool curve to the sum score and add to the base score of 400 + score += rating_v1(counted_opponents.get(opponent)) + return int(score) -- cgit v1.2.3