Update fifa-calculator.py

This commit is contained in:
William
2018-06-13 08:04:49 +00:00
parent a1eccfbf9d
commit 0b6714e94c

View File

@@ -25,8 +25,6 @@ with open('spielplan_vorrunde.csv', newline='') as spielplan, open('team_rating.
relative_rating_home = (rating_home - offset_rating)/(rating_away - offset_rating)
relative_rating_away = 1/relative_rating_home
# calculate goals, no home advantage, round to positive integer
## goals_home = max(0, round(random.gauss((mean_goals/2),std_dev/2)*relative_rating_home))
## goals_away = max(0, round(random.gauss((mean_goals/2),std_dev/2)*relative_rating_away))
goals_home = max(0, round(random.gauss(mean_goals/2*relative_rating_home,std_dev/2)))
goals_away = max(0, round(random.gauss(mean_goals/2*relative_rating_away,std_dev/2)))