|
|
|
|
@ -509,6 +509,16 @@ defer { |
|
|
|
|
updateFollowingMatchTeamScore() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public func teamPosition(for teamRegistration: TeamRegistration) -> TeamPosition? { |
|
|
|
|
if self.team(.one)?.id == teamRegistration.id { |
|
|
|
|
return .one |
|
|
|
|
} else if self.team(.two)?.id == teamRegistration.id { |
|
|
|
|
return .two |
|
|
|
|
} else { |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public func setWalkOut(_ teamPosition: TeamPosition) { |
|
|
|
|
let teamScoreWalkout = teamScore(teamPosition) ?? TeamScore(match: id, team: team(teamPosition)) |
|
|
|
|
teamScoreWalkout.walkOut = 0 |
|
|
|
|
|