Calculate correct number of rounds

This commit is contained in:
2024-11-14 20:32:14 +01:00
parent 5a4e7f89e1
commit 2fdc2e9f56

View File

@@ -349,7 +349,7 @@ export class TournamentManageComponent implements OnInit {
let count = 0;
for (let group of event.groups) {
let numTeams = group.teams.length;
let rounds = Math.trunc(Math.log2(numTeams));
let rounds = numTeams <= 4 ? 3 : 4;
let matchesPerRound = Math.trunc(numTeams / 2);
count += (rounds * matchesPerRound);
}