|
|
|
@ -1854,11 +1854,11 @@ public enum RoundRule { |
|
|
|
|
|
|
|
|
|
|
|
public static func cumulatedNumberOfMatches(forTeams teams: Int) -> Int { |
|
|
|
public static func cumulatedNumberOfMatches(forTeams teams: Int) -> Int { |
|
|
|
var i = teams / 2 |
|
|
|
var i = teams / 2 |
|
|
|
if teams / 2 > 1 { |
|
|
|
var loserTeams = teams / 2 |
|
|
|
i += Self.cumulatedNumberOfMatches(forTeams: teams / 2) |
|
|
|
while loserTeams / 2 > 0 { |
|
|
|
i += Self.cumulatedNumberOfMatches(forTeams: teams / 4) |
|
|
|
i += Self.cumulatedNumberOfMatches(forTeams: loserTeams) |
|
|
|
|
|
|
|
loserTeams = loserTeams / 2 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return i |
|
|
|
return i |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|