diff options
-rw-r--r-- | api/events.py | 1 | ||||
-rw-r--r-- | api/rating.py | 8 |
2 files changed, 5 insertions, 4 deletions
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) |