main
Razmig Sarkissian 4 weeks ago
parent 4454a2c2d6
commit df010931bc
  1. 8
      PadelClubData/ViewModel/PadelRule.swift

@ -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
} }

Loading…
Cancel
Save