]> git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/glicko.py
Count XPM as vanilla as well.
[xonotic/xonstat.git] / xonstat / glicko.py
index f9f9020d0869f63a13bac398ddfd0f1e77dff545..167304392ce280e1a48d92e60528dc5bf6ef8994 100644 (file)
@@ -136,7 +136,7 @@ def rate(player, opponents, results):
     return new_rating
 
 
-class KReduction:
+class KReduction(object):
     """
     Scale the points gained or lost for players based on time played in the given game.
     """
@@ -194,6 +194,10 @@ class GlickoWIP(object):
         # the list of results for those games in the ranking period
         self.results = []
 
+    def __repr__(self):
+        return ("<GlickoWIP({0.pg}, k={0.k_factors}, ping={0.ping_factors}, "
+                "opponents={0.opponents}, results={0.results})>".format(self))
+
 
 class GlickoProcessor(object):
     """