MCPcopy Create free account
hub / github.com/battlecode/battlecode-2018 / run

Function run

scripts/tournament_single_elim.py:342–360  ·  view source on GitHub ↗

No more ranked matches should be run at this point, nor should ratings be updated, nor new bots submitted.

(conn)

Source from the content-addressed store, hash-verified

340
341
342def run(conn) -> None:
343 """
344 No more ranked matches should be run at this point, nor should ratings be
345 updated, nor new bots submitted.
346 """
347 maps = get_tournament_maps(conn, tag=MAP_TAG)
348 teams = get_all_teams_and_index_submissions(conn)
349
350 num_teams = len(teams)
351 if num_teams < 2:
352 logging.warn('Only {} teams in the tournament, exiting...'
353 .format(num_teams))
354 return
355
356 teams = pad_teams_power_of_two(teams)
357 logging.info('Fetched {0} teams and {1} maps'
358 .format(num_teams, len(maps)))
359
360 run_tournament(conn, maps, teams)
361
362
363if __name__ == '__main__':

Callers 1

Calls 5

get_tournament_mapsFunction · 0.85
pad_teams_power_of_twoFunction · 0.85
run_tournamentFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected