public void GetPlayerRatingPerformancesForTeam(int teamId) { Dictionary <int, Dictionary <int, BoutPerformance> > boutPlayerPerformanceMap = new Dictionary <int, Dictionary <int, BoutPerformance> >(); //pull point data IList <PlayerPerformance> playerPerformanceList = new PlayerPerformanceCalculator(_connectionString).GetPlayerPointPerformancesForTeam(teamId); // pull fts data FTSScraper scraper = new FTSScraper(); List <TeamGameRatingData> ftsData = scraper.GetTeamRatingHistory(3402); // TODO: figure out how to translate between our internal team IDs and FTS IDs //splice the player performance records to be clustered by bout, rather than player foreach (PlayerPerformance playerPerformance in playerPerformanceList) { foreach (BoutPerformance boutPerformance in playerPerformance.Bouts) { if (!boutPlayerPerformanceMap.ContainsKey(boutPerformance.BoutID)) { boutPlayerPerformanceMap[boutPerformance.BoutID] = new Dictionary <int, BoutPerformance>(); } boutPlayerPerformanceMap[boutPerformance.BoutID][playerPerformance.Player.ID] = boutPerformance; } } // pair games from the fts record with games from the playerPerformance record }
private static void CreatePlayerPerformanceCsv(string connString) { var ppc = new PlayerPerformanceCalculator(connString); var ppcList = ppc.GetPlayerPointPerformancesForTeam(24); List<List<object>> ratingOverTime = new List<List<object>>(); /*foreach (PlayerPerformance pp in ppcList) { List<object> list = new List<object>(); ratingOverTime.Add(list); //list.Add(pp.Player.Name); //int count = 0; foreach(BoutPerformance bp in pp.Bouts) { foreach(JamPerformance jp in bp.Jams) { } } }*/ }