This commit is contained in:
Amazed 2020-09-28 03:52:48 +02:00
parent d66160b27d
commit 169c38bc01
1 changed files with 3 additions and 2 deletions

View File

@ -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