mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Update game-specific models for 2018.
This commit is contained in:
@@ -96,12 +96,12 @@ func (database *Database) TruncateMatchResults() error {
|
||||
|
||||
// Calculates and returns the summary fields used for ranking and display for the red alliance.
|
||||
func (matchResult *MatchResult) RedScoreSummary() *game.ScoreSummary {
|
||||
return matchResult.RedScore.Summarize(matchResult.BlueScore.Fouls, matchResult.MatchType)
|
||||
return matchResult.RedScore.Summarize(matchResult.BlueScore.Fouls)
|
||||
}
|
||||
|
||||
// Calculates and returns the summary fields used for ranking and display for the blue alliance.
|
||||
func (matchResult *MatchResult) BlueScoreSummary() *game.ScoreSummary {
|
||||
return matchResult.BlueScore.Summarize(matchResult.RedScore.Fouls, matchResult.MatchType)
|
||||
return matchResult.BlueScore.Summarize(matchResult.RedScore.Fouls)
|
||||
}
|
||||
|
||||
// Checks the score for disqualifications or a tie and adjusts it appropriately.
|
||||
|
||||
@@ -25,7 +25,7 @@ func TestMatchResultCrud(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, matchResult, matchResult2)
|
||||
|
||||
matchResult.BlueScore.AutoMobility = 12
|
||||
matchResult.BlueScore.AutoRuns = 12
|
||||
db.SaveMatchResult(matchResult)
|
||||
matchResult2, err = db.GetMatchResultForMatch(254)
|
||||
assert.Nil(t, err)
|
||||
|
||||
Reference in New Issue
Block a user