コード例 #1
0
 private object GetMatchupIdentifier(ProposedMatchup matchup)
 {
     return string.Concat(matchup.Team1.Members.Concat(matchup.Team2.Members).Select(m => m.Id.ToString()));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
ファイル: MatchupModule.cs プロジェクト: Breeto/MatchMaker
        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();
        }