Centralize some match-type-dependent logic.

This commit is contained in:
Patrick Fairbank
2019-07-20 22:42:56 -07:00
parent 016fcc907b
commit 02fa6954bd
6 changed files with 41 additions and 32 deletions

View File

@@ -541,7 +541,7 @@ func createTbaScoringBreakdown(match *model.Match, matchResult *model.MatchResul
breakdown.FaceTheBossRankingPoint = scoreSummary.FaceTheBoss
breakdown.FoulPoints = scoreSummary.FoulPoints
breakdown.TotalPoints = scoreSummary.Score
if match.Type == "qualification" {
if match.ShouldUpdateRankings() {
// Calculate and set the ranking points for the match.
var ranking game.Ranking
ranking.AddScoreSummary(scoreSummary, opponentScoreSummary, false)