]> git.sesse.net Git - ultimatescore/blobdiff - config.js
Make the roster scripts executable.
[ultimatescore] / config.js
index 0b978d596686b8556f9cc3eaf0dbe1cd633a3db3..d9ef9fa40147e37a951320db749b651aa14b7c06 100644 (file)
--- a/config.js
+++ b/config.js
 var ultimateconfig = {
-       'tournament_title': 'Trøndisk 2019',
+       'tournament_title': 'Trøndisk 2021',
        'tournament_footer': 'www.plastkast.no | #trøndisk',
        'exohack': false,
+       'best_thirds': true,
+       'kick_fifth_from_third': true,  // If true, games against the 5th in the group don't count when ranking thirds.
 
        // Share both sheets with ultimate-nm-2018@solskogen-cubemap.iam.gserviceaccount.com.
-       'score_sheet_id': '16TOrQX-oOhuxSA478iE8h3l3CD72GyEqVsChZptayxo',
-       'roster_sheet_id': '1ACCrWaicEOFbeoY05SCbCvk2cHF6yAS9WwFOdNJxMIU',
+       'score_sheet_id': '1dnTjgWEZflVOf_IImbF6-d_JhE3GCchJ7SGTklaiJzs',
+       'score_sheet_index': 1088951921,  // #gid= in the URL.
+       'roster_sheet_id': '1u4Fof_gespv1yUWm4TcusqgkwV2qpTTQaLqFqoXnwNs',
        'api_key': 'AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU',
 
-       // Rank, name, points.
-       'score_sheet_cols': {
-               'Group A': [ 'Results!S', 'Results!T', 'Results!U' ],
-               'Group B': [ 'Results!W', 'Results!X', 'Results!Y' ],
-               'Group C': [ 'Results!AA', 'Results!AB', 'Results!AC' ]
+       'group_cells': {
+               'Group A': {
+                       // Rank, name, points.
+                       'score_sheet_cols': [ 'Results!S', 'Results!T', 'Results!U' ],
+                       'point_total_start_row': 8,
+                       'ranking_list_start_row': 15,
+                       'ranking_list_explain_cell': 'Results!S21',
+                       'rank_offset': 1
+               },
+               'Group B': {
+                       // Rank, name, points.
+                       'score_sheet_cols': [ 'Results!W', 'Results!X', 'Results!Y' ],
+                       'point_total_start_row': 8,
+                       '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–11th': {
+                       // Rank, name, points.
+                       'score_sheet_cols': [ 'Results!S', 'Results!T', 'Results!U' ],
+                       'point_total_start_row': null,
+                       'ranking_list_start_row': 33,
+                       'ranking_list_explain_cell': 'Results!W30',
+                       'rank_offset': 9
+               },
+               'Playoffs 12th–14th': {
+                       // Rank, name, points.
+                       'score_sheet_cols': [ 'Results!AA', 'Results!AB', 'Results!AC' ],
+                       'point_total_start_row': null,
+                       'ranking_list_start_row': 33,
+                       'ranking_list_explain_cell': 'Results!W33',
+                       'rank_offset': 12
+               },
        },
-
-       'point_total_start_row': 8,
-       'ranking_list_start_row': 15,
-       'ranking_list_explain_row': 21,
        'explain_third_cell': 'Results!S26',
+       'group_match_scores': [
+               {
+                       'stream_time_column': 1,  // 0-indexed.
+                       'team1_column': 3,
+                       'team1_score_column': 4,
+                       'team2_score_column': 5,
+                       'team2_column': 6,
+                       'first_row': 7,  // 1-indexed.
+                       'last_row': 19,  // 1-indexed, Inclusive.
+                       'stream_day': 6
+               },
+               {
+                       'team1_column': 8,
+                       'team1_score_column': 9,
+                       'team2_score_column': 10,
+                       'team2_column': 11,
+                       'first_row': 7,
+                       'last_row': 19
+               },
+               {
+                       'team1_column': 13,
+                       'team1_score_column': 14,
+                       'team2_score_column': 15,
+                       'team2_column': 16,
+                       'first_row': 7,
+                       'last_row': 19
+               },
+               // Playoffs 9th–11th. (NOTE: These counts as both playoffs and groups?
+               // Would be problematic for schedules if they were on stream field.)
+               {
+                       'team1_column': 13,
+                       'team1_score_column': 14,
+                       'team2_score_column': 15,
+                       'team2_column': 16,
+                       'first_row': 28,
+                       'last_row': 28,
+                       'group_name': 'Playoffs 9th–11th'
+               },
+               {
+                       'team1_column': 13,
+                       'team1_score_column': 14,
+                       'team2_score_column': 15,
+                       'team2_column': 16,
+                       'first_row': 30,
+                       'last_row': 30,
+                       'group_name': 'Playoffs 9th–11th'
+               },
+               {
+                       'team1_column': 8,
+                       'team1_score_column': 9,
+                       'team2_score_column': 10,
+                       'team2_column': 11,
+                       'first_row': 33,
+                       'last_row': 33,
+                       'group_name': 'Playoffs 9th–11th'
+               },
+               // Playoffs 12th–14th.
+               {
+                       'team1_column': 13,
+                       'team1_score_column': 14,
+                       'team2_score_column': 15,
+                       'team2_column': 16,
+                       'first_row': 29,
+                       'last_row': 29,
+                       'group_name': 'Playoffs 12th–14th'
+               },
+               {
+                       'team1_column': 13,
+                       'team1_score_column': 14,
+                       'team2_score_column': 15,
+                       'team2_column': 16,
+                       'first_row': 31,
+                       'last_row': 31,
+                       'group_name': 'Playoffs 12th–14th'
+               },
+               {
+                       'team1_column': 13,
+                       'team1_score_column': 14,
+                       'team2_score_column': 15,
+                       'team2_column': 16,
+                       'first_row': 33,
+                       'last_row': 33,
+                       'group_name': 'Playoffs 12th–14th'
+               },
+       ],
 
        'playoff_games': [
-               // Teams                        Field   Row    Match name     Mark name    Group name
-               [ 'X5',          'Y5',          0,      0,     'X5/Y5',       false,       'Playoffs 13th–15th' ],
-
-               [ 'X1',          'Y2',          1,      0,     'X1/Y2',       false,       'Quarterfinals'      ],  // s1
-               [ 'X2',          'Y3',          2,      1,     'X2/Y3',       false,       'Quarterfinals'      ],  // s3
-               [ 'Y1',          'Z2',          1,      1,     'Y1/Z2',       false,       'Quarterfinals'      ],  // s4
-               [ 'Z1',          'X3',          0,      1,     'Z1/X3',       false,       'Quarterfinals'      ],  // s2
-
-               [ 'X4',          'Z3',          0,      2,     'X4/Z3',       false,       'Playoffs 9th–12th'  ],
-               [ 'X5',          'Z5',          1,      2,     'X5/Z5',       false,       'Playoffs 13th–15th' ],
-               [ 'Y4',          'Z4',          2,      2,     'Y4/Z4',       false,       'Playoffs 9th–12th'  ],
-
-               [ 'W X1/Y2',     'W Z1/X3',     0,      3,     'Semi 1',      true,        'Semifinals'         ],  //
-               [ 'L X1/Y2',     'L Z1/X3',     1,      3,     'L-semi 1',    true,        'Playoffs 5th–8th'   ],
-               [ 'W X2/Y3',     'W Y1/Z2',     0,      4,     'Semi 2',      true,        'Semifinals'         ],
-               [ 'L X2/Y3',     'L Y1/Z2',     1,      4,     'L-semi 2',    true,        'Playoffs 5th–8th'   ],
-               [ 'Y5',          'Z5',          2,      4,     'Y5/Z5',       false,       'Playoffs 13th–15th' ],
-               [ 'W X4/Z3',     'W Y4/Z4',     0,      5,     '9th',         true,        'Match for 9th'      ],
-               [ 'L X4/Z3',     'L Y4/Z4',     1,      5,     '11th',        true,        'Match for 11th'     ],
-               [ 'L semi 1',    'L semi 2',    0,      6,     '3rd',         true,        'Bronze final'       ],
-               [ 'W L-semi 1',  'W L-semi 2',  1,      6,     '5th',         true,        'Match for 5th'      ],
-               [ 'L L-semi 1',  'L L-semi 2',  2,      6,     '7th',         true,        'Match for 7th'      ],
-               [ 'W semi 1',    'W semi 2',    0,      7,     'Final',       true,        'Final'              ]
+               // Teams                        Field   Row    Match name     Mark name    Group name              Game day (default 7)
+               [ 'Z3',          'XY5',         0,      0,     'P1',          false,       'Playoffs 9th–14th', ],
+               [ 'X4',          'ZY5',         1,      0,     'P2',          false,       'Playoffs 9th–14th', ],
+               [ 'Y4',          'Z4',          2,      0,     'P3',          false,       'Playoffs 9th–14th', ],
+
+               [ 'X1',          'Y3',          0,      1,     'X1/Y3',       false,       'Quarterfinals',     ],  // Q1
+               [ 'Z1',          'Y2',          1,      1,     'Z1/Y2',       false,       'Quarterfinals',     ],  // Q2
+               [ 'X2',          'Z2',          0,      2,     'X2/Z2',       false,       'Quarterfinals'      ],  // Q3
+               [ 'Y1',          'X3',          1,      2,     'Y1/X3',       false,       'Quarterfinals'      ],  // Q4
+
+               // Playoffs 9th–11th, mostly on last field
+               [ 'W P1',        'W P3',        2,      2,     'W P1/W P3',   false,       'Playoffs 9th–11th', ],
+               [ 'W P2',        'W P3',        2,      4,     'W P2/W P3',   false,       'Playoffs 9th–11th', ],
+               [ 'W P1',        'W P2',        1,      7,     'W P1/W P2',   false,       'Playoffs 9th–11th', ],
+
+               // Playoffs 12th–14th, on last field
+               [ 'L P1',        'L P3',        2,      3,     'L P1/L P3',   false,       'Playoffs 12th–14th', ],
+               [ 'L P2',        'L P3',        2,      5,     'L P2/L P3',   false,       'Playoffs 12th–14th', ],
+               [ 'L P1',        'L P2',        2,      7,     'L P1/L P2',   false,       'Playoffs 12th–14th', ],
+
+               // Semifinals
+               [ 'W X1/Y3',     'W Z1/Y2',     0,      3,     'Semi 1',      false,       'Semifinals'         ],
+               [ 'L X1/Y3',     'L Z1/Y2',     1,      3,     'L-semi 1',    false,       'Playoffs 5th–8th'   ],
+               [ 'W X2/Z2',     'W Y1/X3',     0,      4,     'Semi 2',      false,       'Semifinals'         ],
+               [ 'L X2/Z2',     'L Y1/X3',     1,      4,     'L-semi 2',    false,       'Playoffs 5th–8th'   ],
+
+               // Final matches
+               [ 'W L-semi 1',  'W L-semi 2',  0,      6,     '5th',         false,       'Match for 5th'      ],
+               [ 'L L-semi 1',  'L L-semi 2',  1,      6,     '7th',         false,       'Match for 7th'      ],
+               [ 'L semi 1',    'L semi 2',    0,      7,     '3rd',         false,       'Bronze final'       ],
+               [ 'W semi 1',    'W semi 2',    0,      8,     'Final',       false,       'Final'              ]
        ],
        'playoff_games_start_row': 26,
        'playoff_games_cols': [
                [ 3, 4, 5, 6 ],
                [ 8, 9, 10, 11 ],
                [ 13, 14, 15, 16 ],
-       ]
+       ],
+       'playoff_games_start_row_detail_sheet': 38
 };