Skip to content

Commit

Permalink
Update teams for 2018-2019 season
Browse files Browse the repository at this point in the history
Also, look for an optimal draw even earlier due to a situation in this
season where Lyon has no possible group winners to match with.
  • Loading branch information
christarazi committed Dec 13, 2018
1 parent 9ec161f commit dd2c995
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,33 @@

'''
This file contains the simulator code for simulating the Round of 16 in the
UEFA Champions League for the 2016-2017 season.
UEFA Champions League for the 2018-2019 season.
'''

from collections import defaultdict
import copy
import random

group_winners = [
("A", "ENG", "Manchester United"),
("B", "FRA", "PSG"),
("C", "ITA", "AS Roma"),
("D", "SPA", "FC Barcelona"),
("E", "ENG", "Liverpool"),
("A", "GER", "Borussia Dortmund"),
("B", "SPA", "FC Barcelona"),
("C", "FRA", "PSG"),
("D", "POR", "Porto"),
("E", "GER", "Bayern Munich"),
("F", "ENG", "Manchester City"),
("G", "TUR", "Besiktas"),
("H", "ENG", "Tottenham Hotspur")
("G", "SPA", "Real Madrid"),
("H", "ITA", "Juventus")
]

group_runners = [
("A", "SWT", "FC Basel"),
("B", "GER", "Bayern Munich"),
("C", "ENG", "Chelsea"),
("D", "ITA", "Juventus"),
("E", "SPA", "Sevilla"),
("F", "UKR", "Shakhtar Donetsk"),
("G", "POR", "Porto"),
("H", "SPA", "Real Madrid")
("A", "SPA", "Atlético Madrid"),
("B", "ENG", "Tottenham Hotspur"),
("C", "ENG", "Liverpool"),
("D", "GER", "Schalke"),
("E", "NED", "Ajax"),
("F", "FRA", "Lyon"),
("G", "ITA", "Roma"),
("H", "ENG", "Manchester United")
]

valid_draws = defaultdict(list) # Holds all valid draws
Expand Down Expand Up @@ -156,7 +156,7 @@ def _simulate_draw():
while tmp_group_runners and tmp_group_winners:
# When half-way complete, try to avoid conflicts
if (_need_optimal_draw(tmp_valid_draws, tmp_group_runners) or
len(tmp_group_runners) < 5):
len(tmp_group_runners) < 6):
runner_up, winner = _get_optimal_draw(tmp_valid_draws,
tmp_group_runners)
else:
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
</div>

<div class="main">
<h2>UCL Round of 16 2017-2018 Draw Simulator</h2>
<h2>UCL Round of 16 2018-2019 Draw Simulator</h2>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class=flashes>
Expand Down

0 comments on commit dd2c995

Please sign in to comment.