(conn, round_num, maps)
| 271 | |
| 272 | |
| 273 | def queue_round(conn, round_num, maps): |
| 274 | assert len(maps) == NUM_MAPS_PER_GAME |
| 275 | cur = conn.cursor() |
| 276 | cur.execute('SELECT COUNT(*) FROM {} WHERE round=%s;'.format(TABLE_NAME), |
| 277 | (round_num - 1,)) |
| 278 | max_index = int(cur.fetchone()[0] / 3 / 2) |
| 279 | |
| 280 | for index in range(max_index): |
| 281 | red = get_next_team_and_from(conn, round_num, index, COLOR_RED) |
| 282 | blue = get_next_team_and_from(conn, round_num, index, COLOR_BLUE) |
| 283 | queue_match(conn, round_num, index, red, blue, maps) |
| 284 | conn.commit() |
| 285 | cur.close() |
| 286 | |
| 287 | |
| 288 | def queue_initial_round(conn, teams, maps): |
no test coverage detected