private object GetMatchupIdentifier(ProposedMatchup matchup) { return string.Concat(matchup.Team1.Members.Concat(matchup.Team2.Members).Select(m => m.Id.ToString())); }
public SaveMatchupResultViewModel(ProposedMatchup matchup, IEnumerable<Map> maps) { Matchup = matchup; Maps = maps.ToList(); Maps.Sort((map1, map2) => System.String.Compare(map1.Name, map2.Name, System.StringComparison.Ordinal)); }
private ProposedMatchup[] CleanUp( ProposedMatchup[] proposedMatchups ) { foreach ( var proposedMatchup in proposedMatchups ) { if ( proposedMatchup.Team1PredictedWinRatio < 0.5 ) { proposedMatchup.SwapTeams(); } } return proposedMatchups .OrderBy( matchup => matchup.Imbalance ) .Take( App.Settings.MaxMatchupProposalsToPresent ).ToArray(); }