public void ProcessMatchDetail(MatchDetail detail)
        {
            if (!_matches.Summaries.ContainsKey(detail.MatchId))
            {
                return;
            }
            int heroIdx = detail.HeroId - _minHeroId;

            if (heroIdx < 0 || heroIdx >= _totals.Length)
            {
                return;
            }
            WinRateBuilder.Increment(ref _totals[heroIdx], detail.Winner);
        }
        public void ProcessMatchDetail(MatchDetail detail)
        {
            if (!_matches.Summaries.TryGetValue(detail.MatchId, out MatchSummary summary))
            {
                return;
            }
            int heroIdx = detail.HeroId - _minHeroId;

            if (heroIdx < 0 || heroIdx >= _totalsByHero.Length)
            {
                return;
            }
            WinRateBuilder.Increment(ref _totalsByHero[heroIdx], detail.Winner);
            int mapIdx = summary.MapId - _minMapId;

            if (mapIdx < 0 || mapIdx >= _totalsByHeroAndMap.GetLength(1))
            {
                return;
            }
            WinRateBuilder.Increment(ref _totalsByHeroAndMap[heroIdx, mapIdx], detail.Winner);
        }