]> git.sesse.net Git - ultimatescore/commitdiff
Changes for NM 2020 (two groups, no 9th-13th round robin).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 12 Mar 2020 00:08:20 +0000 (01:08 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 12 Mar 2020 00:08:20 +0000 (01:08 +0100)
carousel.js
config.js
update_sheets.js

index db36d790fface8ea2e40baea98a471b159d1c354..109f21a72f684c2c6cb68ed6ba81e162b73815eb 100644 (file)
@@ -720,8 +720,8 @@ function showschedule(page)
        let groups_to_get = [
                'Group A',
                'Group B',
-               'Group C',
-               'Playoffs 9th-13th',
+               // 'Group C',
+               // 'Playoffs 9th-13th',
                'Playoffs'
        ];
        let num_left = groups_to_get.length;
@@ -761,8 +761,8 @@ function showcarousel()
        let groups_to_get = [
                'Group A',
                'Group B',
-               'Group C',
-               'Playoffs 9th-13th',
+               // 'Group C',
+               // 'Playoffs 9th-13th',
                'Playoffs'
        ];
        let num_left = groups_to_get.length;
@@ -781,10 +781,6 @@ function showcarousel()
                                [ 13000, function() { display_group_parsed(teams_per_group['Group A'], games_per_group['Group A'], 'Group A'); } ],
                                [ 2000, function() { hidetable(); } ],
                                [ 13000, function() { display_group_parsed(teams_per_group['Group B'], games_per_group['Group B'], 'Group B'); } ],
-                               [ 2000, function() { hidetable(); } ],
-                               [ 13000, function() { display_group_parsed(teams_per_group['Group C'], games_per_group['Group C'], 'Group C'); } ],
-                               [ 2000, function() { hidetable(); } ],
-                               [ 13000, function() { display_group_parsed(teams_per_group['Playoffs 9th-13th'], games_per_group['Playoffs 9th-13th'], 'Playoffs 9th–13th'); } ],
                                [ 2000, function() { hidetable(); } ]
                        ];
                        let num_pages = find_num_pages(combined_games);
index fb91c0485545900e02956584155172d0dd3b4bee..37fb62bb800b56caf22d741490bd467b26e80363 100644 (file)
--- a/config.js
+++ b/config.js
@@ -1,14 +1,14 @@
 var ultimateconfig = {
-       'tournament_title': 'Battle for Oak Hill 2020',
-       'tournament_footer': 'www.plastkast.no | #oakhill',
+       'tournament_title': 'NM 2020',
+       'tournament_footer': 'www.plastkast.no | #ultimatenm',
        'exohack': true,
-       'best_thirds': true,
-       'kick_fifth_from_third': true,
+       'best_thirds': false,
+       'kick_fifth_from_third': false,
 
        // Share both sheets with ultimate-nm-2018@solskogen-cubemap.iam.gserviceaccount.com.
-       'score_sheet_id': '1vEKBGGG0DYkQUcePY9EHFaT1Nj_Ops57xHzKvIBCloU',
+       'score_sheet_id': '1jU_iU6ca97Ag7j9CJI9lIVkpGrkRK0XRP5CePv-vxWw',
        'score_sheet_index': 1088951921,  // #gid= in the URL.
-       'roster_sheet_id': '1is-fwcH_miWEaSJuP8aocvmNUESaS_HbFx58oTZ3EJ4',
+       'roster_sheet_id': '1fJgTYVQlqxc4AedVU6HEEgsUUGT_c2YmPD4h0ZilS1k',
        'api_key': 'AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU',
 
        'group_cells': {
@@ -27,61 +27,33 @@ var ultimateconfig = {
                        'ranking_list_start_row': 15,
                        'ranking_list_explain_cell': 'Results!W21',
                        'rank_offset': 1
-               },
-               'Group C': {
-                       // Rank, name, points.
-                       'score_sheet_cols': [ 'Results!AA', 'Results!AB', 'Results!AC' ],
-                       'point_total_start_row': 8,
-                       'ranking_list_start_row': 15,
-                       'ranking_list_explain_cell': 'Results!AA21',
-                       'rank_offset': 1
-               },
-               'Playoffs 9th-13th': {
-                       // Rank, name, points.
-                       'score_sheet_cols': [ 'Results!S', 'Results!T', 'Results!U' ],
-                       'point_total_start_row': null,
-                       'ranking_list_start_row': 34,
-                       'ranking_list_explain_cell': 'Results!W34',
-                       'rank_offset': 9
                }
        },
-       'explain_third_cell': 'Results!S27',
+       'explain_third_cell': null,
 
        'playoff_games': [
                // Teams                        Field   Row    Match name     Mark name    Group name              Game day (default 7)
-               [ 'C5',          'A4',          0,      0,     'C5/A4',       false,       'Playoffs 9th–13th',    6 ],
-               [ 'B4',          'C4',          1,      0,     'B4/C4',       false,       'Playoffs 9th–13th',    6 ],
-               [ 'X1',          'Y3',          0,      1,     'X1/Y3',       false,       'Quarterfinals',        6 ],  // Q1
-               [ 'Z1',          'Y2',          1,      1,     'Z1/Y2',       false,       'Quarterfinals',        6 ],  // Q2
-               [ 'A4',          'B4',          0,      2,     'A4/B4',       false,       'Playoffs 9th–13th',    6 ],
-               [ 'Z3',          'C5',          1,      2,     'Z3/C5',       false,       'Playoffs 9th–13th',    6 ],
-               [ 'C4',          'Z3',          0,      8,     'C4/Z3',       false,       'Playoffs 9th–13th' ],
-               [ 'C5',          'B4',          1,      8,     'C5/B4',       false,       'Playoffs 9th–13th' ],
+               [ 'A4',          'B5',          0,      0,     'A4/B5',       false,       '4th/5th crossover' ],
+               [ 'B4',          'A5',          1,      0,     'B4/A5',       false,       '4th/5th crossover' ],
 
-               [ 'X2',          'Z2',          0,      9,     'X2/Z2',       false,       'Quarterfinals'     ],  // Q3
-               [ 'Y1',          'X3',          1,      9,     'Y1/X3',       false,       'Quarterfinals'     ],  // Q4
+               [ 'A1',          'B2',          0,      1,     'Semi 1',      false,       'Semifinals'        ],
+               [ 'B1',          'A2',          1,      1,     'Semi 2',      false,       'Semifinals'        ],
 
-               [ 'C4',          'C5',          0,     10,     'C4/B5',       false,       'Playoffs 9th–13th' ],
-               [ 'Z3',          'A4',          1,     10,     'Z3/A4',       false,       'Playoffs 9th–13th' ],
+               [ 'B3',          'W A4/B5',     0,      2,     'L-semi 1',    false,       'Playoffs 5th–8th'  ],
+               [ 'W B4/A5',     'A3',          1,      2,     'L-semi 1',    false,       'Playoffs 5th–8th'  ],
 
-               [ 'W X1/Y3',     'W Z1/Y2',     0,     11,     'Semi 1',      false,       'Semifinals'        ],
-               [ 'L X1/Y3',     'L Z1/Y2',     1,     11,     'L-semi 1',    false,       'Playoffs 5th–8th'  ],
-               [ 'W X2/Z2',     'W Y1/X3',     0,     12,     'Semi 2',      false,       'Semifinals'        ],
-               [ 'L X2/Z2',     'L Y1/X3',     1,     12,     'L-semi 2',    false,       'Playoffs 5th–8th'  ],
+               [ 'L semi 1',    'L semi 2',    0,      3,     '3rd',         false,       'Bronze final'      ],
+               [ 'L A4/B5',     'L B4/A5',     1,      3,     '9th',         false,       'Match for 9th'     ],
 
-               [ 'B4',          'Z3',          0,     13,     'B4/Z3',       false,       'Playoffs 9th–13th' ],
-               [ 'A4',          'C4',          1,     13,     'A4/C4',       false,       'Playoffs 9th–13th' ],
+               [ 'W L-semi 1',  'W L-semi 2',  0,      4,     '5th',         false,       'Match for 5th'     ],
+               [ 'L L-semi 1',  'L L-semi 2',  1,      4,     '7th',         false,       'Match for 7th'     ],
 
-               [ 'W L-semi 1',  'W L-semi 2',  1,     14,     '5th',         false,       'Match for 5th'      ],
-               [ 'L L-semi 1',  'L L-semi 2',  1,     15,     '7th',         false,       'Match for 7th'      ],
-               [ 'L semi 1',    'L semi 2',    0,     14,     '3rd',         false,       'Bronze final'       ],
-               [ 'W semi 1',    'W semi 2',    0,     16,     'Final',       false,       'Final'              ]
+               [ 'W semi 1',    'W semi 2',    0,      5,     'Final',       false,       'Final'             ]
        ],
-       'playoff_games_start_row': 19,
+       'playoff_games_start_row': 21,
        'playoff_games_cols': [
                [ 3, 4, 5, 6 ],
-               [ 8, 9, 10, 11 ],
-               [ 13, 14, 15, 16 ],
+               [ 8, 9, 10, 11 ]
        ],
        'playoff_games_start_row_detail_sheet': 38
 };
index f4e01e635d83b4c5ecd75b159a6f9b6057605a8e..e58a086a7ff763843f8ea1f46b05fb6e597611eb 100644 (file)
@@ -394,7 +394,6 @@ function fill_playoff(replacements, teams) {
                };
                possibly_update_oauth_key(function() {
                        post_json('https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + '/values:batchUpdate?key=' + ultimateconfig['api_key'], json, function(response) {
-                               get_group('Playoffs 9th-13th', function(response_l) { publish_group_rank(response_l, 'Playoffs 9th-13th'); });
                        }, current_oauth_access_token);
                        post_json('https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + ':batchUpdate?key=' + ultimateconfig['api_key'], meta_json, function(response) {}, current_oauth_access_token);
                });
@@ -414,17 +413,13 @@ function get_results(sheet_name, cb)
 function publish_group_ranks() {
        get_group('Group A', function(response_a) {
                get_group('Group B', function(response_b) {
-                       get_group('Group C', function(response_c) {
                                publish_group_rank(response_a, 'Group A');
                                publish_group_rank(response_b, 'Group B');
-                               publish_group_rank(response_c, 'Group C');
 
-                               let replacements = montecarlo([response_a, response_b, response_c]);
+                               let replacements = montecarlo([response_a, response_b]);
                                let team_a = parse_teams_from_spreadsheet(response_a);
                                let team_b = parse_teams_from_spreadsheet(response_b);
-                               let team_c = parse_teams_from_spreadsheet(response_c);
-                               fill_playoff(replacements, [team_a, team_b, team_c]);
-                       });
+                               fill_playoff(replacements, [team_a, team_b]);
                });
        });
 }