]> git.sesse.net Git - ultimatescore/commitdiff
Fix an issue where the schedule would be partially unfilled.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 10 Oct 2021 22:29:37 +0000 (00:29 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 10 Oct 2021 22:29:37 +0000 (00:29 +0200)
nageru/tfk_pause.png
update_sheets.js

index 991e5699afb57c3682e8ade90fe0d54279b338e5..eba7e50854d364efdb59e35f5cf0f342a80c819a 100644 (file)
Binary files a/nageru/tfk_pause.png and b/nageru/tfk_pause.png differ
index ae8df0e3aa0fb8fc8a56e7ba5c8706f36d31c75c..edaed4d4a6dcf9be2f96116e750f467c411465f1 100644 (file)
@@ -318,7 +318,7 @@ function do_replacements(str, replacements) {
        return str;
 }
 
-function fill_playoff(all_teams, groups, replacements, teams) {
+function fill_playoff(all_teams, groups, replacements) {
        let team_expansions = {};
        for (const team of all_teams) {
                team_expansions[team.name] = team_expansions[team.mediumname] = team_expansions[team.shortname] =
@@ -430,7 +430,7 @@ function publish_group_ranks() {
                                publish_group_rank(teams_c, games, 'Group C');
 
                                let replacements = montecarlo(teams, groups, games, ['Group A', 'Group B', 'Group C']);
-                               fill_playoff(teams, groups, replacements, [teams_a, teams_b, teams_c]);
+                               fill_playoff(teams, groups, replacements);
                        });
                });
        });
@@ -438,6 +438,7 @@ function publish_group_ranks() {
 
 function get_all_playoff_games(teams, groups, group_games, cb) {
        let replacements = montecarlo(teams, groups, group_games, ['Group A', 'Group B', 'Group C']);
+       fill_playoff(teams, groups, replacements);  // To get the replacements.
        let games = ultimateconfig['playoff_games'];
        get_results('Results', function(response) {
                let playoff_games = [];