|
|
|
|
@ -2119,7 +2119,18 @@ defer { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public func removeRound(_ round: Round) async { |
|
|
|
|
await MainActor.run { |
|
|
|
|
let teams = round.seeds() |
|
|
|
|
teams.forEach { team in |
|
|
|
|
team.resetBracketPosition() |
|
|
|
|
} |
|
|
|
|
tournamentStore?.teamRegistrations.addOrUpdate(contentOfs: teams) |
|
|
|
|
tournamentStore?.rounds.delete(instance: round) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public func addNewRound(_ roundIndex: Int) async { |
|
|
|
|
await MainActor.run { |
|
|
|
|
let round = Round(tournament: id, index: roundIndex, format: matchFormat) |
|
|
|
|
|