Made match creation use auto-incrementing ID.

This commit is contained in:
Patrick Fairbank
2014-05-26 17:07:55 -07:00
parent 834842f1d2
commit a4d461c795
4 changed files with 16 additions and 17 deletions

View File

@@ -57,7 +57,6 @@ func BuildRandomSchedule(teams []Team, scheduleBlocks []ScheduleBlock, matchType
teamShuffle := rand.Perm(numTeams)
matches := make([]Match, numMatches)
for i, anonMatch := range anonSchedule {
matches[i].Id = i + 1
matches[i].Type = matchType
matches[i].DisplayName = strconv.Itoa(i + 1)
matches[i].Red1 = teams[teamShuffle[anonMatch[0]-1]].Id