void RunCommonAnalytics(Model model)
        {
            CommonAnalytics customview = new CommonAnalytics();

            customview.Init(new ModuleDescriptor(model.config, model.configDescription, model.schemes));
            StartConfiguring(customview);
        }
Beispiel #2
0
        private static CommonAnalytics AnalyzeGames(IReadOnlyCollection <FullGame> fullGames)
        {
            var analytics = new CommonAnalytics {
                TotalGames = fullGames.Count
            };

            foreach (var fullGame in fullGames)
            {
                AnalyzeGame(fullGame);
                switch (fullGame.State)
                {
                case GameState.Real:
                    analytics.RealGames++;
                    break;

                case GameState.NoRounds:
                    analytics.NoRounds++;
                    break;

                case GameState.FewAddedWords:
                    analytics.FewAddedWords++;
                    break;

                case GameState.FewPlayedRounds:
                    analytics.FewPlayedRounds++;
                    break;

                case GameState.LowAverageTime:
                    analytics.LowAverageTime++;
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            return(analytics);
        }