- drawMatchup(canvas, mid_x, mid_y, 2 * 3, -1);
+ const groups = 4;
+ const rounds = Math.log2(artists.length / groups);
+ for (let group = 1; group <= groups; group++) {
+ for (let round = 0; round < rounds; round++) {
+ const matchup = [artists.shift(), artists.pop()];
+ drawMatchup(canvas, mid_x, mid_y, 2 * round, Math.pow(-1, group), ...matchup);
+ }
+ }