Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'''
International Elo program
Created and Maintained by Joshua Mansfield
Last updated: 31 May 2018
'''
from math import *
class Elo():
def __init__(self):
self.dictionary = {"AUS": 1500, "AUT": 1500, "BEL": 1500, "BRA": 1500, "CAN": 1500, "CAT": 1500, "DEU": 1500, "ESP": 1500, "FRA": 1500, "IRL": 1500, "ITA": 1500, "KOR": 1500, "MEX": 1500, "NLD": 1500, "NOR": 1500, "POL": 1500, "SVK": 1500, "SVN": 1500, "SWE": 1500, "TUR": 1500, "UK": 1500, "USA": 1500}
#Initializes Dictionary with each team's starting Elo set to 1500
def __str__(self):
team_list = ''
for team in self.dictionary:
team_list += team + " " + str(round(self.dictionary[team], 0)) + "\n"
return team_list
#Creates a return function to call after game functions have been run.
def world_elo_change(self, Team1, Team2, T1qp, T2qp, snitch = None):
#Creates a function for games that occur at World Cup international games
#Snitch catches that bring the game to overtime are added to each team's quaffle points and NOT recorded in the snitch value, consistent with USQ's SWIM calculation algorithm(https://www.usquidditch.org/standings/explaination/)
#Snitch value is assigned 30 if Team1 catches, -30 if away team catches, 0 if game expires without a catch
Team1Elo = self.dictionary[Team1] #Calls initial Elo rating of first team
Team2Elo = self.dictionary[Team2] #Calls initial Elo rating of second team
mult = 1.8 #sets SWIM(K) Multiplier at 1.8 x standard Elo change
if T1qp + snitch > T2qp:
winner = 1
#Calculates final score of game and determines winner
elif T1qp + snitch == T2qp:
print("There is an error in your score reporting for teams", Team1, Team2)
winner = 0
#Determines if score was entered as a tie (TeamSet for incorrect entry)
else:
winner = 0
elodiff = Team1Elo - Team2Elo
T1We = 1/(10**(-elodiff/400) + 1) #Calculates Win expectency for team 1
T2We = 1/((10**(elodiff/400)) + 1) #Calculates Win expectency for team 2
if winner == 1:
P = T1qp - T2qp
Padj = min(P, 80) + sqrt(max(P - 80, 0))
if snitch == 30:
if Padj >= 30:
SWIM = Padj + (30*(exp(-0.033*(Padj - 20))))
else:
SWIM = Padj + 30
else:
SWIM = Padj
#Calculates SWIM value multiplier to determine win strength
Team1newelo = Team1Elo + (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 1
Team2newelo = Team2Elo - (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 2
elif winner == 0:
P = T2qp - T1qp
Padj = min(P, 80) + sqrt(max(P - 80, 0))
if snitch == -30:
if Padj >= 30:
SWIM = Padj + (30*(exp(-0.033*(Padj - 20))))
else:
SWIM = Padj + 30
else:
SWIM = Padj
#Calculates SWIM value multiplier to determine win strength
Team1newelo = Team1Elo - (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 1
Team2newelo = Team2Elo + (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 2
self.dictionary[Team1] = Team1newelo #Assigns Team 1's new Elo rating
self.dictionary[Team2] = Team2newelo #Assigns Team 2's new Elo rating
def cont_elo_change(self, Team1, Team2, T1qp, T2qp, snitch = None):
#Creates a function for games that occur at continental international games
#Snitch catches that bring the game to overtime are added to each team's quaffle points and NOT recorded in the snitch value, consistent with USQ's SWIM calculation algorithm (https://www.usquidditch.org/standings/explaination/)
#Snitch value is assigned 30 if Team1 catches, -30 if away team catches, 0 if game expires without a catch
Team1Elo = self.dictionary[Team1] #Calls initial Elo rating of first team
Team2Elo = self.dictionary[Team2] #Calls initial Elo rating of second team
mult = 1.2 #sets SWIM(K) Multiplier at 1.2 x standard Elo change
if T1qp + snitch > T2qp:
winner = 1
#Calculates final score of game and determines winner
elif T1qp + snitch == T2qp:
print("There is an error in your score reporting for teams", Team1, Team2)
winner = 0
#Determines if score was entered as a tie (TeamSet for incorrect entry)
else:
winner = 0
elodiff = Team1Elo - Team2Elo
T1We = 1/(10**(-elodiff/400) + 1) #Calculates Win expectency for team 1
T2We = 1/((10**(elodiff/400)) + 1) #Calculates Win expectency for team 2
if winner == 1:
P = T1qp - T2qp
Padj = min(P, 80) + sqrt(max(P - 80, 0))
if snitch == 30:
if Padj >= 30:
SWIM = Padj + (30*(exp(-0.033*(Padj - 20))))
else:
SWIM = Padj + 30
else:
SWIM = Padj
#Calculates SWIM value multiplier to determine win strength
Team1newelo = Team1Elo + (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 1
Team2newelo = Team2Elo - (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 2
elif winner == 0:
P = T2qp - T1qp
Padj = min(P, 80) + sqrt(max(P - 80, 0))
if snitch == -30:
if Padj >= 30:
SWIM = Padj + (30*(exp(-0.033*(Padj - 20))))
else:
SWIM = Padj + 30
else:
SWIM = Padj
#Calculates SWIM value multiplier to determine win strength
Team1newelo = Team1Elo - (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 1
Team2newelo = Team2Elo + (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 2
self.dictionary[Team1] = Team1newelo #Assigns Team 1's new Elo rating
self.dictionary[Team2] = Team2newelo #Assigns Team 2's new Elo rating
def friendly_elo_change(self, Team1, Team2, T1qp, T2qp, snitch = None):
#Creates a function for international friendly games
#Snitch catches that bring the game to overtime are added to each team's quaffle points and NOT recorded in the snitch value, consistent with USQ's SWIM calculation algorithm(https://www.usquidditch.org/standings/explaination/)
#Snitch value is assigned 30 if Team1 catches, -30 if away team catches, 0 if game expires without a catch
Team1Elo = self.dictionary[Team1] #Calls initial Elo rating of first team
Team2Elo = self.dictionary[Team2] #Calls initial Elo rating of second team
mult = 0.8 #sets SWIM(K) Multiplier at 0.8 x standard Elo change
if T1qp + snitch > T2qp:
winner = 1
#Calculates final score of game and determines winner
elif T1qp + snitch == T2qp:
print("There is an error in your score reporting for teams", Team1, Team2)
winner = 0
#Determines if score was entered as a tie (TeamSet for incorrect entry)
else:
winner = 0
elodiff = Team1Elo - Team2Elo
T1We = 1/(10**(-elodiff/400) + 1) #Calculates Win expectency for team 1
T2We = 1/((10**(elodiff/400)) + 1) #Calculates Win expectency for team 2
if winner == 1:
P = T1qp - T2qp
Padj = min(P, 80) + sqrt(max(P - 80, 0))
if snitch == 30:
if Padj >= 30:
SWIM = Padj + (30*(exp(-0.033*(Padj - 20))))
else:
SWIM = Padj + 30
else:
SWIM = Padj
#Calculates SWIM value multiplier to determine win strength
Team1newelo = Team1Elo + (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 1
Team2newelo = Team2Elo - (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 2
elif winner == 0:
P = T2qp - T1qp
Padj = min(P, 80) + sqrt(max(P - 80, 0))
if snitch == -30:
if Padj >= 30:
SWIM = Padj + (30*(exp(-0.033*(Padj - 20))))
else:
SWIM = Padj + 30
else:
SWIM = Padj
#Calculates SWIM value multiplier to determine win strength
Team1newelo = Team1Elo - (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 1
Team2newelo = Team2Elo + (SWIM*mult*(1-T1We)) #Creates new Elo rating for Team 2
self.dictionary[Team1] = Team1newelo #Assigns Team 1's new Elo rating
self.dictionary[Team2] = Team2newelo #Assigns Team 2's new Elo rating
TeamSet = Elo() #Creates an instance of Elo whose dictionary can be altered game by game.
#2012 IQA Summer Games
TeamSet.world_elo_change("FRA", "UK", 140, 10, -30)
TeamSet.world_elo_change("USA", "AUS", 180, 0, 30)
TeamSet.world_elo_change("CAN", "UK", 100, 30, -30)
TeamSet.world_elo_change("USA", "FRA", 60, 10, 30)
TeamSet.world_elo_change("CAN", "AUS", 50, 10, -30)
TeamSet.world_elo_change("USA", "UK", 160, 0, 30)
TeamSet.world_elo_change("FRA", "AUS", 80, 10, -30)
TeamSet.world_elo_change("USA", "CAN", 90, 10, 30)
TeamSet.world_elo_change("AUS", "UK", 0, 0, 30) #Score Unknown, AUS = winner
TeamSet.world_elo_change("CAN", "FRA", 90, 60, 0) #(90*-60, 1OT)
TeamSet.world_elo_change("USA", "AUS", 110, 0, 30) #Semifinal 1
TeamSet.world_elo_change("FRA", "CAN", 60, 40, 30) #Semifinal 2
TeamSet.world_elo_change("AUS", "CAN", 30, 50, 30) #Third Place Game
TeamSet.world_elo_change("USA", "FRA", 130, 0, 30) #Final
#2014 IQA Global Games
TeamSet.world_elo_change("MEX", "BEL", 120, 80, 30)
TeamSet.world_elo_change("USA", "CAN", 130, 40, -30)
TeamSet.world_elo_change("AUS", "FRA", 160, 90, 0) #(160-90*, 1OT)
TeamSet.world_elo_change("CAN", "MEX", 200, 10, 30)
TeamSet.world_elo_change("BEL", "UK", 60, 20, 30)
TeamSet.world_elo_change("USA", "FRA", 220, 20, 30)
TeamSet.world_elo_change("BEL", "CAN", 70, 0, -30)
TeamSet.world_elo_change("AUS", "MEX", 140, 40, -30)
TeamSet.world_elo_change("USA", "UK", 120, 0, 30)
TeamSet.world_elo_change("AUS", "BEL", 130, 0, 30)
TeamSet.world_elo_change("MEX", "FRA", 80, 60, 30)
TeamSet.world_elo_change("CAN", "UK", 70, 20, 30)
TeamSet.world_elo_change("BEL", "FRA", 110, 60, 30)
TeamSet.world_elo_change("USA", "MEX", 190, 10, 30)
TeamSet.world_elo_change("CAN", "FRA", 140, 20, 30)
TeamSet.world_elo_change("AUS", "UK", 80, 20, -30)
TeamSet.world_elo_change("USA", "BEL", 120, 0, 30)
TeamSet.world_elo_change("UK", "MEX", 110, 40, 30)
TeamSet.world_elo_change("AUS", "CAN", 40, 40, 30)
TeamSet.world_elo_change("UK", "FRA", 100, 50, 30)
TeamSet.world_elo_change("USA", "AUS", 100, 20, 30)
TeamSet.world_elo_change("MEX", "FRA", 60, 80, 30) #Fifth Place Game
TeamSet.world_elo_change("CAN", "UK", 40, 40, 30) #Third Place Game
TeamSet.world_elo_change("USA", "AUS", 180, 0, 30) #Final
#2015 IQA European Games
#Group A
TeamSet.cont_elo_change("TUR", "ESP", 70, 30, 30)
TeamSet.cont_elo_change("BEL", "POL", 120, 0, 30)
TeamSet.cont_elo_change("FRA", "TUR", 160, 60, 30)
TeamSet.cont_elo_change("BEL", "CAT", 160, 50, 30)
TeamSet.cont_elo_change("FRA", "ESP", 130, 10, 30)
TeamSet.cont_elo_change("TUR", "POL", 170, 0, 30)
TeamSet.cont_elo_change("BEL", "ESP", 110, 20, 30)
TeamSet.cont_elo_change("FRA", "CAT", 160, 30, 30)
TeamSet.cont_elo_change("ESP", "POL", 140, 0, 30)
TeamSet.cont_elo_change("TUR", "CAT", 70, 80, 30)
TeamSet.cont_elo_change("FRA", "BEL", 120, 50, 30)
TeamSet.cont_elo_change("FRA", "POL", 330, 10, 30)
TeamSet.cont_elo_change("BEL", "TUR", 110, 50, 30)
TeamSet.cont_elo_change("CAT", "POL", 160, 0, 30)
#Group B
TeamSet.cont_elo_change("NOR", "IRL", 250, 10, 30)
TeamSet.cont_elo_change("UK", "DEU", 90, 30, 30)
TeamSet.cont_elo_change("NLD", "IRL", 30, 30, 30)
TeamSet.cont_elo_change("ITA", "DEU", 70, 30, 30)
TeamSet.cont_elo_change("UK", "NOR", 70, 40, 30)
TeamSet.cont_elo_change("DEU", "NLD", 120, 10, -30)
TeamSet.cont_elo_change("ITA", "IRL", 150, 0, 30)
TeamSet.cont_elo_change("NOR", "NLD", 190, 0, 30)
TeamSet.cont_elo_change("UK", "ITA", 80, 30, 30)
TeamSet.cont_elo_change("NOR", "DEU", 80, 20, -30)
TeamSet.cont_elo_change("UK", "IRL", 240, 0, 30)
TeamSet.cont_elo_change("UK", "NLD", 200, 0, -30)
TeamSet.cont_elo_change("DEU", "IRL", 110, 20, -30)
TeamSet.cont_elo_change("ITA", "NLD", 90, 20, 30)
#Bracket
TeamSet.cont_elo_change("FRA", "DEU", 160, 0, -30)
TeamSet.cont_elo_change("NOR", "TUR", 130, 50, 30)
TeamSet.cont_elo_change("UK", "CAT", 160, 0, 30)
TeamSet.cont_elo_change("BEL", "ITA", 90, 0, -30)
TeamSet.cont_elo_change("FRA", "NOR", 80, 40, 30) #Semifinal 1
TeamSet.cont_elo_change("UK", "BEL", 50, 40, 30) #Semifinal 2
TeamSet.cont_elo_change("NOR", "BEL", 120, 80, 30) #Third Place Game
TeamSet.cont_elo_change("FRA", "UK", 60, 50, 30) #Final
#2016 IQA World Cup
#Pool 1
TeamSet.world_elo_change("ITA", "NLD", 110, 40, 30)
TeamSet.world_elo_change("FRA", "SVN", 210, 50, 30)
TeamSet.world_elo_change("ITA", "SVN", 130, 50, -30)
TeamSet.world_elo_change("FRA", "NLD", 210, 0, 30)
TeamSet.world_elo_change("FRA", "ITA", 130, 50, 30)
TeamSet.world_elo_change("SVN", "NLD", 70, 90, 30)
#Pool 2
TeamSet.world_elo_change("SVK", "IRL", 90, 50, 30)
TeamSet.world_elo_change("AUS", "BEL", 130, 40, -30)
TeamSet.world_elo_change("BEL", "IRL", 220, 20, 30)
TeamSet.world_elo_change("AUS", "SVK", 200, 10, 30)
TeamSet.world_elo_change("AUS", "IRL", 230, 0, 30)
TeamSet.world_elo_change("BEL", "SVK", 160, 30, -30)
#Pool 3
TeamSet.world_elo_change("UK", "TUR", 140, 40, 30)
TeamSet.world_elo_change("ESP", "KOR", 80, 10, 30)
TeamSet.world_elo_change("UK", "AUT", 140, 0, 30)
TeamSet.world_elo_change("TUR", "KOR", 170, 40, 30)
TeamSet.world_elo_change("AUT", "ESP", 50, 70, 30)
TeamSet.world_elo_change("UK", "KOR", 150, 10, -30)
TeamSet.world_elo_change("TUR", "ESP", 150, 50, 30)
TeamSet.world_elo_change("TUR", "AUT", 160, 30, -30)
TeamSet.world_elo_change("UK", "ESP", 190, 0, 30)
TeamSet.world_elo_change("AUT", "KOR", 120, 0, 30)
#Pool 4
TeamSet.world_elo_change("CAN", "CAT", 150, 20, 30)
TeamSet.world_elo_change("MEX", "POL", 170, 20, 30)
TeamSet.world_elo_change("CAT", "POL", 110, 40, -30)
TeamSet.world_elo_change("CAN", "MEX", 150, 20, 30)
TeamSet.world_elo_change("MEX", "CAT", 230, 130, 30)
TeamSet.world_elo_change("CAN", "POL", 210, 0, 30)
#Pool 5
TeamSet.world_elo_change("NOR", "DEU", 110, 60, 30)
TeamSet.world_elo_change("USA", "BRA", 180, 0, 30)
TeamSet.world_elo_change("USA", "DEU", 170, 10, -30)
TeamSet.world_elo_change("NOR", "BRA", 120, 70, 30)
TeamSet.world_elo_change("USA", "NOR", 200, 10, 30)
TeamSet.world_elo_change("DEU", "BRA", 170, 50, 30)
#Bracket
TeamSet.world_elo_change("ESP", "NLD", 130, 30, -30)
TeamSet.world_elo_change("BRA", "SVK", 120, 40, 30)
TeamSet.world_elo_change("DEU", "KOR", 120, 0, 30)
TeamSet.world_elo_change("CAT", "POL", 90, 10, -30)
TeamSet.world_elo_change("SVN", "IRL", 120, 70, 30)
TeamSet.world_elo_change("CAN", "ESP", 140, 30, 30)
TeamSet.world_elo_change("MEX", "NOR", 70, 80, 30)
TeamSet.world_elo_change("FRA", "BRA", 190, 20, -30)
TeamSet.world_elo_change("AUS", "DEU", 120, 20, 30)
TeamSet.world_elo_change("USA", "CAT", 240, 10, 30)
TeamSet.world_elo_change("BEL", "ITA", 180, 130, 30)
TeamSet.world_elo_change("UK", "SVN", 190, 20, 30)
TeamSet.world_elo_change("TUR", "AUT", 100, 20, -30)
TeamSet.world_elo_change("CAN", "MEX", 110, 30, 30)
TeamSet.world_elo_change("AUS", "FRA", 80, 60, 30)
TeamSet.world_elo_change("USA", "BEL", 100, 50, 30)
TeamSet.world_elo_change("UK", "TUR", 150, 40, 30)
TeamSet.world_elo_change("NOR", "BRA", 150, 40, 30)
TeamSet.world_elo_change("DEU", "SVN", 110, 30, 30)
TeamSet.world_elo_change("ESP", "ITA", 80, 50, 30)
TeamSet.world_elo_change("CAT", "AUT", 100, 70, 30)
TeamSet.world_elo_change("ITA", "BRA", 170, 60, 30)
TeamSet.world_elo_change("AUT", "SVN", 90, 110, 30)
TeamSet.world_elo_change("SVN", "BRA", 140, 120, 30) #Fifteenth Place Game
TeamSet.world_elo_change("ITA", "AUT", 110, 40, 30) #Thirteenth Place Game
TeamSet.world_elo_change("NOR", "DEU", 50, 60, 30)
TeamSet.world_elo_change("ESP", "CAT", 100, 80, 30)
TeamSet.world_elo_change("DEU", "CAT", 220, 60, 30) #Eleventh Place Game
TeamSet.world_elo_change("NOR", "ESP", 140, 30, 30) #Ninth Place Game
TeamSet.world_elo_change("FRA", "MEX", 130, 10, 30)
TeamSet.world_elo_change("TUR", "BEL", 120, 140, 30)
TeamSet.world_elo_change("BEL", "MEX", 120, 30, 30) #Seventh Place Game
TeamSet.world_elo_change("FRA", "TUR", 110, 50, 30) #Fifth Place Game
TeamSet.world_elo_change("AUS", "CAN", 50, 40, 30) #Semifinal 1
TeamSet.world_elo_change("USA", "UK", 110, 40, 30) #Semifinal 2
TeamSet.world_elo_change("UK", "CAN", 160, 60, 30) #Third Place Game
TeamSet.world_elo_change("AUS", "USA", 120, 130, 30) #Final
#2017 IQA European Games
#Group A
TeamSet.cont_elo_change("UK", "NOR", 40, 60, 30)
TeamSet.cont_elo_change("FRA", "TUR", 70, 60, 30)
TeamSet.cont_elo_change("UK", "FRA", 50, 20, 30)
TeamSet.cont_elo_change("TUR", "BEL", 120, 120, 30)
TeamSet.cont_elo_change("NOR", "TUR", 110, 80, 30)
TeamSet.cont_elo_change("FRA", "BEL", 110, 130, 30)
TeamSet.cont_elo_change("BEL", "NOR", 50, 50, 30)
TeamSet.cont_elo_change("UK", "TUR", 110, 30, 30)
TeamSet.cont_elo_change("BEL", "UK", 50, 70, 30)
TeamSet.cont_elo_change("FRA", "NOR", 120, 50, 30)
#Group B
TeamSet.cont_elo_change("DEU", "CAT", 70, 40, 30)
TeamSet.cont_elo_change("ESP", "ITA", 100, 90, 30)
TeamSet.cont_elo_change("ESP", "CAT", 150, 110, 30)
TeamSet.cont_elo_change("AUT", "ITA", 50, 50, 30)
TeamSet.cont_elo_change("DEU", "ESP", 90, 20, 30)
TeamSet.cont_elo_change("AUT", "CAT", 60, 50, 30)
TeamSet.cont_elo_change("CAT", "ITA", 100, 120, 30) #(130*^-120, 1OT)
TeamSet.cont_elo_change("AUT", "DEU", 70, 90, 30)
TeamSet.cont_elo_change("ESP", "AUT", 80, 50, 30)
TeamSet.cont_elo_change("DEU", "ITA", 140, 40, 30)
#Group C
TeamSet.cont_elo_change("NLD", "IRL", 70, 40, 30)
TeamSet.cont_elo_change("POL", "SVK", 40, 40, 30)
TeamSet.cont_elo_change("SVK", "SWE", 120, 20, -30)
TeamSet.cont_elo_change("POL", "IRL", 170, 140, 30)
TeamSet.cont_elo_change("NLD", "POL", 60, 80, 30)
TeamSet.cont_elo_change("IRL", "SWE", 120, 30, -30)
TeamSet.cont_elo_change("SVK", "IRL", 90, 60, 30)
TeamSet.cont_elo_change("NLD", "SWE", 210, 20, -30)
TeamSet.cont_elo_change("SVK", "NLD", 80, 60, 30)
TeamSet.cont_elo_change("POL", "SWE", 230, 30, 30)
#Bracket
TeamSet.cont_elo_change("AUT", "CAT", 70, 40, 30)
TeamSet.cont_elo_change("NOR", "NLD", 190, 30, -30)
TeamSet.cont_elo_change("TUR", "SVK", 130, 20, 30)
TeamSet.cont_elo_change("FRA", "SWE", 260, 10, 30)
TeamSet.cont_elo_change("ITA", "ESP", 80, 100, 30)
TeamSet.cont_elo_change("BEL", "IRL", 170, 10, 30)
TeamSet.cont_elo_change("DEU", "POL", 150, 30, 30)
TeamSet.cont_elo_change("SVK", "NLD", 70, 80, 30)
TeamSet.cont_elo_change("ESP", "SWE", 170, 0, -30)
TeamSet.cont_elo_change("POL", "IRL", 100, 90, 30)
TeamSet.cont_elo_change("IRL", "SWE", 130, 40, -30)
TeamSet.cont_elo_change("NLD", "IRL", 130, 60, 30) #Thirteenth Place Game
TeamSet.cont_elo_change("CAT", "SVK", 70, 30, 30)
TeamSet.cont_elo_change("ESP", "POL", 180, 50, 30)
TeamSet.cont_elo_change("POL", "SVK", 90, 50, 30) #Eleventh Place Game
TeamSet.cont_elo_change("ESP", "CAT", 60, 50, 30) #Ninth Place Game
TeamSet.cont_elo_change("UK", "AUT", 140, 0, -30)
TeamSet.cont_elo_change("NOR", "TUR", 160, 120, 30)
TeamSet.cont_elo_change("FRA", "ITA", 250, 40, 30)
TeamSet.cont_elo_change("BEL", "DEU", 90, 50, 30)
TeamSet.cont_elo_change("TUR", "AUT", 110, 20, 30)
TeamSet.cont_elo_change("DEU", "ITA", 90, 20, 30)
TeamSet.cont_elo_change("AUT", "ITA", 80, 70, 30) #Seventh Place Game
TeamSet.cont_elo_change("DEU", "TUR", 130, 120, 0) #(130*-120, 1OT) #Fifth Place Game
TeamSet.cont_elo_change("UK", "NOR", 80, 40, 30) #Semifinal 1
TeamSet.cont_elo_change("FRA", "BEL", 50, 50, 30) #Semifinal 2
TeamSet.cont_elo_change("NOR", "BEL", 110, 80, 30) #Third Place Game
TeamSet.cont_elo_change("UK", "FRA", 60, 70, 30) #Final
print(TeamSet)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.