if (game[2] == 0) { // Stream field.
// Game.
+ let ss_row = ultimateconfig['playoff_games_start_row_detail_sheet'] + game_num;
updates.push({
- "range": "Playoffs!A" + (game_num + 32) + ":J" + (game_num + 32),
+ "range": "Playoffs!A" + ss_row + ":J" + ss_row,
"values": [ [ team1, team2, score1, score2, "", "", "", game_day, response['values'][row - 1][1].replace(".",":"), game[6] ] ]
});
};
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);
});
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]);
});
});
}
}
function publish_best_thirds() {
+ if (!ultimateconfig['best_thirds']) return;
get_group('Group A', function(response_a) {
get_group('Group B', function(response_b) {
get_group('Group C', function(response_c) {