From 169c38bc01d6400b6434e1803c2846b52abf1f0d Mon Sep 17 00:00:00 2001 From: Hipstercat Date: Mon, 28 Sep 2020 03:52:48 +0200 Subject: [PATCH] cleanup --- cogs/sacrifice/sacrifice.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cogs/sacrifice/sacrifice.py b/cogs/sacrifice/sacrifice.py index a80079c..4865e5c 100644 --- a/cogs/sacrifice/sacrifice.py +++ b/cogs/sacrifice/sacrifice.py @@ -117,7 +117,8 @@ class SacrificeCog(commands.Cog): @staticmethod def expection(d): - return 1/(1+math.pow(10, -d/400)) # https://fr.wikipedia.org/wiki/Classement_Elo#Relation_entre_diff%C3%A9rence_de_points_Elo_et_probabilit%C3%A9_de_gain + # https://fr.wikipedia.org/wiki/Classement_Elo#Relation_entre_diff%C3%A9rence_de_points_Elo_et_probabilit%C3%A9_de_gain + return 1/(1+math.pow(10, -d/400)) async def win(self, winner_id: str, looser_id: str) -> None: elo_winner = await self.get_elo(winner_id) @@ -143,5 +144,5 @@ class SacrificeCog(commands.Cog): if discord_id in elos: return elos[discord_id] else: - # calculate new elo + # set new elo = 1500 return 1500