void ShuffleMatches(MatchResultContainer[] matches) { for (int t = 0; t < matches.Length; t++) { MatchResultContainer tmp = matches[t]; int r = Random.Range(t, matches.Length); matches[t] = matches[r]; matches[r] = tmp; } }
public MatchWeek(Team[] teams, int weekNumber = 1) { addedPoints = false; this.weekNumber = weekNumber; matches = new MatchResultContainer[teams.Length / 2]; for (int ii = 0; ii < teams.Length / 2; ii++) { matches[ii] = new MatchResultContainer(teams[ii], teams[teams.Length - ii - 1]); } }