|
|
|
|
@ -498,7 +498,7 @@ defer { |
|
|
|
|
return seedInterval.localizedLabel(displayStyle) |
|
|
|
|
} |
|
|
|
|
print("Round pas trouvé", id, parent, index) |
|
|
|
|
return "Round pas trouvé" |
|
|
|
|
return "--" |
|
|
|
|
} |
|
|
|
|
return RoundRule.roundName(fromRoundIndex: index, displayStyle: displayStyle) |
|
|
|
|
} |
|
|
|
|
@ -574,7 +574,19 @@ defer { |
|
|
|
|
let matches = (0..<matchCount).map { //0 is final match |
|
|
|
|
let roundIndex = RoundRule.roundIndex(fromMatchIndex: $0) |
|
|
|
|
let round = rounds[roundIndex] |
|
|
|
|
return Match(round: round.id, index: $0, matchFormat: loserBracketMatchFormat, name: round.roundTitle()) |
|
|
|
|
return Match(round: round.id, index: $0, matchFormat: loserBracketMatchFormat) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
try self.tournamentStore.matches.addOrUpdate(contentOfs: matches) |
|
|
|
|
} catch { |
|
|
|
|
Logger.error(error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
matches.forEach { //0 is final match |
|
|
|
|
let roundIndex = RoundRule.roundIndex(fromMatchIndex: $0.index) |
|
|
|
|
let round = rounds[roundIndex] |
|
|
|
|
$0.name = round.roundTitle() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|