Calculate correct number of rounds
This commit is contained in:
1 parent
5a4e7f89e1
commit
2fdc2e9f56
1 file changed
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user