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

Function serialize_tournament

scripts/tournament_serialize.py:147–159  ·  view source on GitHub ↗
(cur)

Source from the content-addressed store, hash-verified

145
146
147def serialize_tournament(cur):
148 index_team_info(cur)
149
150 tournament = {}
151 tournament['tournament'] = TOURNAMENT_NAME
152 tournament['rounds'] = []
153
154 cur.execute('SELECT MAX(round) FROM {};'.format(TABLE_NAME))
155 max_round = cur.fetchone()[0]
156 for round_num in range(0, max_round + 1):
157 tournament['rounds'].append(serialize_round(cur, round_num))
158
159 return tournament
160
161
162if __name__ == '__main__':

Callers 1

Calls 3

index_team_infoFunction · 0.85
serialize_roundFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected