예제 #1
0
            public void Should_return_map_info_correctly_for_wingman_hostage_maps()
            {
                // Arrange
                var ProcessedData3 = ProcessedData;

                ProcessedData3.DemoInformation = new DemoInformation()
                {
                    DemoName = "demo4",
                    MapName  = "de_testmap4",
                    TestDate = new DateTime(2020, 1, 1, 0, 0, 0).ToString(),
                    TestType = "Wingman",
                };
                ProcessedData3.MatchStartValues = new List <MatchStartedEventArgs>()
                {
                    new MatchStartedEventArgs
                    {
                        Mapname      = "de_testmap4",
                        HasBombsites = false,
                    }
                };

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.mapInfo.DemoName.ShouldBe("demo4");
                allStats.mapInfo.MapName.ShouldBe("de_testmap4");
                allStats.mapInfo.TestDate.ShouldBe(new DateTime(2020, 1, 1, 0, 0, 0).ToString());
                allStats.mapInfo.TestType.ShouldBe("Wingman");
            }
예제 #2
0
            public void Should_return_team_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.teamStats.Count.ShouldBe(2);

                allStats.teamStats[0].Round.ShouldBe(1);
                allStats.teamStats[0].TeamAlphaKills.ShouldBe(1);
                allStats.teamStats[0].TeamAlphaDeaths.ShouldBe(0);
                allStats.teamStats[0].TeamAlphaHeadshots.ShouldBe(1);
                allStats.teamStats[0].TeamBravoKills.ShouldBe(0);
                allStats.teamStats[0].TeamBravoDeaths.ShouldBe(1);
                allStats.teamStats[0].TeamBravoHeadshots.ShouldBe(0);
                allStats.teamStats[0].TeamAlphaShotsFired.ShouldBe(3);
                allStats.teamStats[0].TeamBravoShotsFired.ShouldBe(0);

                allStats.teamStats[1].Round.ShouldBe(2);
                allStats.teamStats[1].TeamAlphaKills.ShouldBe(1);
                allStats.teamStats[1].TeamAlphaDeaths.ShouldBe(0);
                allStats.teamStats[1].TeamAlphaHeadshots.ShouldBe(1);
                allStats.teamStats[1].TeamBravoKills.ShouldBe(0);
                allStats.teamStats[1].TeamBravoDeaths.ShouldBe(1);
                allStats.teamStats[1].TeamBravoHeadshots.ShouldBe(0);
                allStats.teamStats[1].TeamAlphaShotsFired.ShouldBe(3);
                allStats.teamStats[1].TeamBravoShotsFired.ShouldBe(1);
            }
예제 #3
0
            public void Should_return_rounds_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.roundsStats.Count.ShouldBe(2);

                allStats.roundsStats[0].BombPlantPositionX.ShouldBe(100);
                allStats.roundsStats[0].BombPlantPositionY.ShouldBe(100);
                allStats.roundsStats[0].BombPlantPositionZ.ShouldBe(100);
                allStats.roundsStats[0].BombsiteErrorMessage.ShouldBeNull();
                allStats.roundsStats[0].BombsitePlantedAt.ShouldBe("A");
                allStats.roundsStats[0].Half.ShouldBe("First");
                allStats.roundsStats[0].HostageAPickedUpErrorMessage.ShouldBeNull();
                allStats.roundsStats[0].HostageBPickedUpErrorMessage.ShouldBeNull();
                allStats.roundsStats[0].Length.ShouldBe(80);
                allStats.roundsStats[0].Overtime.ShouldBe(0);
                allStats.roundsStats[0].PickedUpAllHostages.ShouldBe(true);
                allStats.roundsStats[0].PickedUpHostageA.ShouldBe(true);
                allStats.roundsStats[0].PickedUpHostageB.ShouldBe(true);
                allStats.roundsStats[0].RescuedAllHostages.ShouldBe(true);
                allStats.roundsStats[0].RescuedHostageA.ShouldBe(true);
                allStats.roundsStats[0].RescuedHostageB.ShouldBe(true);
                allStats.roundsStats[0].Round.ShouldBe(1);
                allStats.roundsStats[0].TimeInRoundPlanted.ShouldBe(35);
                allStats.roundsStats[0].TimeInRoundExploded.ShouldBe(75);
                allStats.roundsStats[0].TimeInRoundDefused.ShouldBeNull();
                allStats.roundsStats[0].TimeInRoundRescuedHostageA.ShouldBe(50);
                allStats.roundsStats[0].TimeInRoundRescuedHostageB.ShouldBe(51);
                allStats.roundsStats[0].WinMethod.ShouldBe("Bombed");
                allStats.roundsStats[0].Winners.ShouldBe("Terrorist");

                allStats.roundsStats[1].BombPlantPositionX.ShouldBe(400);
                allStats.roundsStats[1].BombPlantPositionY.ShouldBe(400);
                allStats.roundsStats[1].BombPlantPositionZ.ShouldBe(400);
                allStats.roundsStats[1].BombsiteErrorMessage.ShouldBeNull();
                allStats.roundsStats[1].BombsitePlantedAt.ShouldBe("B");
                allStats.roundsStats[1].Half.ShouldBe("Second");
                allStats.roundsStats[1].HostageAPickedUpErrorMessage.ShouldBeNull();
                allStats.roundsStats[1].HostageBPickedUpErrorMessage.ShouldBeNull();
                allStats.roundsStats[1].Length.ShouldBe(105);
                allStats.roundsStats[1].Overtime.ShouldBe(0);
                allStats.roundsStats[1].PickedUpAllHostages.ShouldBe(false);
                allStats.roundsStats[1].PickedUpHostageA.ShouldBe(true);
                allStats.roundsStats[1].PickedUpHostageB.ShouldBe(false);
                allStats.roundsStats[1].RescuedAllHostages.ShouldBe(false);
                allStats.roundsStats[1].RescuedHostageA.ShouldBe(false);
                allStats.roundsStats[1].RescuedHostageB.ShouldBe(false);
                allStats.roundsStats[1].Round.ShouldBe(2);
                allStats.roundsStats[1].TimeInRoundPlanted.ShouldBe(60);
                allStats.roundsStats[1].TimeInRoundExploded.ShouldBeNull();
                allStats.roundsStats[1].TimeInRoundDefused.ShouldBe(100);
                allStats.roundsStats[1].TimeInRoundRescuedHostageA.ShouldBeNull();
                allStats.roundsStats[1].TimeInRoundRescuedHostageB.ShouldBeNull();
                allStats.roundsStats[1].WinMethod.ShouldBe("Defused");
                allStats.roundsStats[1].Winners.ShouldBe("CounterTerrorist");
            }
예제 #4
0
            public void Should_return_chicken_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.chickenStats.Killed.ShouldBe(1);
            }
예제 #5
0
            public void Should_return_version_number_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.versionNumber.Version.ShouldBe("1.1.16");
            }
예제 #6
0
            public void Should_return_winners_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.winnersStats.TeamAlphaRounds.ShouldBe(2);
                allStats.winnersStats.TeamBetaRounds.ShouldBe(0);
                allStats.winnersStats.WinningTeam.ShouldBe("Team Alpha");
            }
예제 #7
0
            public void Should_return_feedback_messages_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.feedbackMessages.Count.ShouldBe(1);
                allStats.feedbackMessages[0].Round.ShouldBe(1);
                allStats.feedbackMessages[0].Message.ShouldBe("bad map");
            }
예제 #8
0
            public void Should_return_map_info_correctly_for_defuse_maps()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.mapInfo.DemoName.ShouldBe("demo1");
                allStats.mapInfo.MapName.ShouldBe("de_testmap");
                allStats.mapInfo.TestDate.ShouldBe(new DateTime(2020, 1, 1, 0, 0, 0).ToString());
                allStats.mapInfo.TestType.ShouldBe("Defuse");
            }
예제 #9
0
            public void Should_return_supported_gamemodes_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.supportedGamemodes.Count.ShouldBe(3);
                allStats.supportedGamemodes[0].ShouldBe("Defuse");
                allStats.supportedGamemodes[1].ShouldBe("Hostage");
                allStats.supportedGamemodes[2].ShouldBe("Wingman");
            }
예제 #10
0
            public void Should_return_tanooki_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.tanookiStats.Joined.ShouldBe(true);
                allStats.tanookiStats.Left.ShouldBe(true);
                allStats.tanookiStats.RoundJoined.ShouldBe(1);
                allStats.tanookiStats.RoundLeft.ShouldBe(2);
                allStats.tanookiStats.RoundsLasted.ShouldBe(1);
            }
예제 #11
0
            public void Should_return_kills_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.killsStats.Count.ShouldBe(2);
                allStats.killsStats[0].Round.ShouldBe(1);
                allStats.killsStats[0].TimeInRound.ShouldBe(40);
                allStats.killsStats[1].Round.ShouldBe(2);
                allStats.killsStats[1].TimeInRound.ShouldBe(90);
            }
예제 #12
0
            public void Should_return_bombsite_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.bombsiteStats.Count.ShouldBe(2);
                allStats.bombsiteStats[0].Plants.ShouldBe(1);
                allStats.bombsiteStats[0].Explosions.ShouldBe(1);
                allStats.bombsiteStats[0].Defuses.ShouldBe(0);
                allStats.bombsiteStats[1].Plants.ShouldBe(1);
                allStats.bombsiteStats[1].Explosions.ShouldBe(0);
                allStats.bombsiteStats[1].Defuses.ShouldBe(1);
            }
예제 #13
0
            public void Should_return_grenade_specific_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.grenadesSpecificStats.Count.ShouldBe(6);
                allStats.grenadesSpecificStats[0].NadeType.ShouldBe(EquipmentElement.Flash.ToString());
                allStats.grenadesSpecificStats[1].NadeType.ShouldBe(EquipmentElement.Smoke.ToString());
                allStats.grenadesSpecificStats[2].NadeType.ShouldBe(EquipmentElement.HE.ToString());
                allStats.grenadesSpecificStats[3].NadeType.ShouldBe(EquipmentElement.Molotov.ToString());
                allStats.grenadesSpecificStats[4].NadeType.ShouldBe(EquipmentElement.Incendiary.ToString());
                allStats.grenadesSpecificStats[5].NadeType.ShouldBe(EquipmentElement.Decoy.ToString());
            }
예제 #14
0
            public void Should_return_hostage_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.hostageStats.Count.ShouldBe(2);
                allStats.hostageStats[0].Hostage.ShouldBe('A');
                allStats.hostageStats[0].HostageIndex.ShouldBe(250);
                allStats.hostageStats[0].PickedUps.ShouldBe(2);
                allStats.hostageStats[0].Rescues.ShouldBe(1);
                allStats.hostageStats[1].Hostage.ShouldBe('B');
                allStats.hostageStats[1].HostageIndex.ShouldBe(251);
                allStats.hostageStats[1].PickedUps.ShouldBe(1);
                allStats.hostageStats[1].Rescues.ShouldBe(1);
            }
예제 #15
0
            public void Should_return_grenade_total_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.grenadesTotalStats.Count.ShouldBe(5);
                allStats.grenadesTotalStats[0].NadeType.ShouldBe(EquipmentElement.Flash.ToString());
                allStats.grenadesTotalStats[0].AmountUsed.ShouldBe(1);
                allStats.grenadesTotalStats[1].NadeType.ShouldBe(EquipmentElement.Smoke.ToString());
                allStats.grenadesTotalStats[1].AmountUsed.ShouldBe(1);
                allStats.grenadesTotalStats[2].NadeType.ShouldBe(EquipmentElement.HE.ToString());
                allStats.grenadesTotalStats[2].AmountUsed.ShouldBe(1);
                allStats.grenadesTotalStats[3].NadeType.ShouldBe(EquipmentElement.Incendiary.ToString());
                allStats.grenadesTotalStats[3].AmountUsed.ShouldBe(2);
                allStats.grenadesTotalStats[4].NadeType.ShouldBe(EquipmentElement.Decoy.ToString());
                allStats.grenadesTotalStats[4].AmountUsed.ShouldBe(1);
            }
예제 #16
0
            public void Should_return_player_stats_correctly()
            {
                // Arrange

                // Act
                AllStats allStats = MatchData.CreateFiles(ProcessedData, false);

                // Assess
                allStats.playerStats.Count.ShouldBe(2);

                allStats.playerStats[0].Assists.ShouldBe(0);
                allStats.playerStats[0].AssistsIncludingBots.ShouldBe(0);
                allStats.playerStats[0].Deaths.ShouldBe(0);
                allStats.playerStats[0].DeathsIncludingBots.ShouldBe(0);
                allStats.playerStats[0].Defuses.ShouldBe(1);
                allStats.playerStats[0].Headshots.ShouldBe(1);             // took over a bot for one of them
                allStats.playerStats[0].Kills.ShouldBe(1);                 // took over a bot for one of them
                allStats.playerStats[0].KillsIncludingBots.ShouldBe(2);
                allStats.playerStats[0].MVPs.ShouldBe(2);
                allStats.playerStats[0].Plants.ShouldBe(1);
                allStats.playerStats[0].PlayerName.ShouldBe("JimWood");
                allStats.playerStats[0].Rescues.ShouldBe(0);
                allStats.playerStats[0].Shots.ShouldBe(6);
                allStats.playerStats[0].SteamID.ShouldBe(32443298432);

                allStats.playerStats[1].Assists.ShouldBe(1);
                allStats.playerStats[1].AssistsIncludingBots.ShouldBe(1);
                allStats.playerStats[1].Deaths.ShouldBe(1);                 // took over a bot for one of them
                allStats.playerStats[1].DeathsIncludingBots.ShouldBe(2);
                allStats.playerStats[1].Defuses.ShouldBe(0);
                allStats.playerStats[1].Headshots.ShouldBe(0);
                allStats.playerStats[1].Kills.ShouldBe(0);
                allStats.playerStats[1].KillsIncludingBots.ShouldBe(0);
                allStats.playerStats[1].MVPs.ShouldBe(0);
                allStats.playerStats[1].Plants.ShouldBe(1);
                allStats.playerStats[1].PlayerName.ShouldBe("TheWhaleMan");
                allStats.playerStats[1].Rescues.ShouldBe(2);
                allStats.playerStats[1].Shots.ShouldBe(1);
                allStats.playerStats[1].SteamID.ShouldBe(12321313213);
            }
예제 #17
0
파일: Program.cs 프로젝트: JamesT-W/IDemO
        //Program entry point
        static void Main(string[] args)
        {
            string cfgPath = "config.cfg";

            bool   recursive           = false;
            bool   steaminfo           = false;
            bool   clear               = false;
            bool   parseChickens       = true;
            string outputRootFolder    = "parsed";
            bool   sameFilename        = false;
            bool   sameFolderStructure = false;
            bool   lowOutputMode       = false;

            List <string> foldersToProcess = new List <string>();
            List <string> demosToProcess   = new List <string>();

            if (args.Count() == 0)
            {
                helpText();
                return;
            }

            for (int i = 0; i < args.Count(); i++)
            {
                var arg = args[i].ToLower();

                if (arg == "-config")
                {
                    if (i < args.Count())
                    {
                        cfgPath = args[i + 1];
                    }

                    i++;
                }
                else if (arg == "-folders")
                {
                    bool searching = true;
                    while (i < args.Count() - 1 && searching)
                    {
                        i++;

                        if (args[i][0] == '-')
                        {
                            searching = false;
                        }
                        else
                        {
                            foldersToProcess.Add(args[i]);
                        }
                    }
                    i--;
                }
                else if (arg == "-demos")
                {
                    bool searching = true;
                    while (i < args.Count() - 1 && searching)
                    {
                        i++;

                        if (args[i][0] == '-')
                        {
                            searching = false;
                        }
                        else
                        {
                            demosToProcess.Add(args[i]);
                        }
                    }
                    i--;
                }
                else if (arg == "-output")
                {
                    outputRootFolder = args[i + 1];
                    i++;
                }
                else if (arg == "-clear")
                {
                    clear = true;
                }
                else if (arg == "-steaminfo")
                {
                    steaminfo = true;
                }
                else if (arg == "-recursive")
                {
                    recursive = true;
                }
                else if (arg == "-help")
                {
                    helpText();
                    return;
                }
                else if (arg == "-nochickens")
                {
                    parseChickens = false;
                }
                else if (arg == "-samefilename")
                {
                    sameFilename = true;
                }
                else if (arg == "-samefolderstructure")
                {
                    sameFolderStructure = true;
                }
                else if (arg == "-lowoutputmode")
                {
                    lowOutputMode = true;
                }
            }

            if (steaminfo)
            {
                if (File.Exists(cfgPath))
                {
                    try
                    {
                        Config cfg = new Config(cfgPath);

                        Steam.setAPIKey(cfg.keyVals["apikey"]);

                        if (Steam.getSteamUserNamesLookupTable(new List <long>()
                        {
                            76561198072130043
                        }) == null)
                        {
                            throw new Exception("CONFIG::STEAM_API_KEY::INVALID");
                        }
                    }
                    catch (Exception e)
                    {
                        Debug.Error("CONFIG ERROR... INFO:: {0}\nSteam names will not be retrieved!!!", e.Message);
                        steaminfo = false;
                    }
                }
                else
                {
                    Debug.Error("Config unreadable... Steam names will not be retrieved!!!");
                    steaminfo = false;
                }
            }

            //Clear by recreating folder
            if (clear && Directory.Exists(outputRootFolder))
            {
                Directory.Delete(outputRootFolder, true);
                Directory.CreateDirectory(outputRootFolder);
            }
            else if (!Directory.Exists(outputRootFolder))
            {
                Directory.CreateDirectory(outputRootFolder);
            }

            List <DemoInformation> demosInformation = new List <DemoInformation>();

            foreach (string folder in foldersToProcess)
            {
                try
                {
                    string[] subDemos = Directory.GetFiles(Path.GetFullPath(folder), "*.dem", recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
                    foreach (string demo in subDemos)
                    {
                        string[] pathSplit = demo.Split('\\');
                        string   testDate, testType, mapname;

                        Guid     guid;
                        string[] filenameSplit = pathSplit[pathSplit.Count() - 1].Split('.');
                        bool     isFaceitDemo  = Guid.TryParse(filenameSplit[0], out guid);

                        if (isFaceitDemo)
                        {
                            testDate = "unknown";
                            testType = "unknown";
                            mapname  = "unknown";
                        }
                        else
                        {
                            filenameSplit = pathSplit[pathSplit.Count() - 1].Split('_', '.');

                            bool isSEDiscordDemo = filenameSplit.Count() > 5 ? true : false;

                            if (isSEDiscordDemo)
                            {
                                testDate = $"{ filenameSplit[1] }/{ filenameSplit[0] }/{ filenameSplit[2] }";
                                testType = $"{ filenameSplit[filenameSplit.Count() - 2] }";
                                mapname  = $"{ filenameSplit[3] }";

                                for (int i = 4; i < filenameSplit.Count() - 2; i++)
                                {
                                    mapname += $"_{ filenameSplit[i] }";
                                }
                            }
                            else //cannot determine demo name format
                            {
                                testDate = "unknown";
                                testType = "unknown";
                                mapname  = "unknown";
                            }
                        }

                        demosInformation.Add(new DemoInformation()
                        {
                            DemoName = demo, MapName = mapname, TestDate = testDate, TestType = testType
                        });
                    }
                }
                catch (Exception e)
                {
                    throw e;
                }
            }

            foreach (string demo in demosToProcess)
            {
                try
                {
                    string testDate, testType, mapname;

                    Guid     guid;
                    string[] filenameSplit = demo.Split('.');
                    bool     isFaceitDemo  = Guid.TryParse(filenameSplit[0], out guid);

                    if (isFaceitDemo)
                    {
                        testDate = "unknown";
                        testType = "unknown";
                        mapname  = "unknown";
                    }
                    else
                    {
                        filenameSplit = demo.Split('_', '.');

                        bool isSEDiscordDemo = filenameSplit.Count() > 5 ? true : false;

                        if (isSEDiscordDemo)
                        {
                            testDate = $"{ filenameSplit[1] }/{ filenameSplit[0] }/{ filenameSplit[2] }";
                            testType = $"{ filenameSplit[filenameSplit.Count() - 2] }";
                            mapname  = $"{ filenameSplit[3] }";

                            for (int i = 4; i < filenameSplit.Count() - 2; i++)
                            {
                                mapname += $"_{ filenameSplit[i] }";
                            }
                        }
                        else //cannot determine demo name format
                        {
                            testDate = "unknown";
                            testType = "unknown";
                            mapname  = "unknown";
                        }
                    }

                    demosInformation.Add(new DemoInformation()
                    {
                        DemoName = demo, MapName = mapname, TestDate = testDate, TestType = testType
                    });
                }
                catch (Exception e)
                {
                    throw e;
                }
            }

            Debug.Info("Starting processing of {0} demos.\n", demosInformation.Count());
            DateTime startTime = DateTime.Now;

            int passCount = 0;

            Console.CursorVisible = false;
            //Process all the found demos
            for (int i = 0; i < demosInformation.Count(); i++)
            {
                Console.WriteLine($"Parsing demo {demosInformation[i].DemoName}");

                MatchData mdTest = MatchData.FromDemoFile(demosInformation[i].DemoName, parseChickens, lowOutputMode);

                IEnumerable <MatchStartedEventArgs>        mse = new List <MatchStartedEventArgs>();
                IEnumerable <SwitchSidesEventArgs>         sse = new List <SwitchSidesEventArgs>();
                IEnumerable <FeedbackMessage>              fme = new List <FeedbackMessage>();
                IEnumerable <TeamPlayers>                  tpe = new List <TeamPlayers>();
                IEnumerable <PlayerKilledEventArgs>        pke = new List <PlayerKilledEventArgs>();
                Dictionary <string, IEnumerable <Player> > pe  = new Dictionary <string, IEnumerable <Player> >();
                IEnumerable <Equipment>          pwe           = new List <Equipment>();
                IEnumerable <int>                poe           = new List <int>();
                IEnumerable <BombPlanted>        bpe           = new List <BombPlanted>();
                IEnumerable <BombExploded>       bee           = new List <BombExploded>();
                IEnumerable <BombDefused>        bde           = new List <BombDefused>();
                IEnumerable <HostageRescued>     hre           = new List <HostageRescued>();
                IEnumerable <HostagePickedUp>    hpu           = new List <HostagePickedUp>();
                IEnumerable <DisconnectedPlayer> dpe           = new List <DisconnectedPlayer>();
                IEnumerable <Team>               te            = new List <Team>();
                IEnumerable <RoundEndReason>     re            = new List <RoundEndReason>();
                IEnumerable <double>             le            = new List <double>();
                IEnumerable <TeamEquipmentStats> tes           = new List <TeamEquipmentStats>();
                IEnumerable <NadeEventArgs>      ge            = new List <NadeEventArgs>();
                //IEnumerable<SmokeEventArgs> gse = new List<SmokeEventArgs>();
                //IEnumerable<FlashEventArgs> gfe = new List<FlashEventArgs>();
                //IEnumerable<GrenadeEventArgs> gge = new List<GrenadeEventArgs>();
                //IEnumerable<FireEventArgs> gie = new List<FireEventArgs>();
                //IEnumerable<DecoyEventArgs> gde = new List<DecoyEventArgs>();
                IEnumerable <ChickenKilledEventArgs> cke = new List <ChickenKilledEventArgs>();
                IEnumerable <ShotFired> sfe = new List <ShotFired>();

                mse = (from start in mdTest.GetEvents <MatchStartedEventArgs>()
                       select(start as MatchStartedEventArgs));

                sse = (from switchSide in mdTest.GetEvents <SwitchSidesEventArgs>()
                       select(switchSide as SwitchSidesEventArgs));

                fme = (from message in mdTest.GetEvents <FeedbackMessage>()
                       select(message as FeedbackMessage));

                pke = (from player in mdTest.GetEvents <PlayerKilledEventArgs>()
                       select(player as PlayerKilledEventArgs));

                pe.Add("Kills", from player in mdTest.GetEvents <PlayerKilledEventArgs>()
                       select(player as PlayerKilledEventArgs).Killer);

                pe.Add("Deaths", from player in mdTest.GetEvents <PlayerKilledEventArgs>()
                       select(player as PlayerKilledEventArgs).Victim);

                pe.Add("Headshots", from player in mdTest.GetEvents <PlayerKilledEventArgs>()
                       where (player as PlayerKilledEventArgs).Headshot
                       select(player as PlayerKilledEventArgs).Killer);

                pe.Add("Assists", from player in mdTest.GetEvents <PlayerKilledEventArgs>()
                       where (player as PlayerKilledEventArgs).Assister != null
                       select(player as PlayerKilledEventArgs).Assister);

                pwe = (from weapon in mdTest.GetEvents <PlayerKilledEventArgs>()
                       select(weapon as PlayerKilledEventArgs).Weapon);

                poe = (from penetration in mdTest.GetEvents <PlayerKilledEventArgs>()
                       select(penetration as PlayerKilledEventArgs).PenetratedObjects);

                pe.Add("MVPs", from player in mdTest.GetEvents <RoundMVPEventArgs>()
                       select(player as RoundMVPEventArgs).Player);

                pe.Add("Shots", from player in mdTest.GetEvents <WeaponFiredEventArgs>()
                       select(player as WeaponFiredEventArgs).Shooter);

                pe.Add("Plants", from player in mdTest.GetEvents <BombPlanted>()
                       select(player as BombPlanted).Player);

                pe.Add("Defuses", from player in mdTest.GetEvents <BombDefused>()
                       select(player as BombDefused).Player);

                pe.Add("Rescues", from player in mdTest.GetEvents <HostageRescued>()
                       select(player as HostageRescued).Player);

                bpe = (from plant in mdTest.GetEvents <BombPlanted>()
                       select plant as BombPlanted)
                      .GroupBy(p => p.Round)
                      .Select(p => p.FirstOrDefault());

                bee = (from explode in mdTest.GetEvents <BombExploded>()
                       select explode as BombExploded)
                      .GroupBy(p => p.Round)
                      .Select(p => p.FirstOrDefault());

                bde = (from defuse in mdTest.GetEvents <BombDefused>()
                       select defuse as BombDefused)
                      .GroupBy(p => p.Round)
                      .Select(p => p.FirstOrDefault());

                hre = (from hostage in mdTest.GetEvents <HostageRescued>()
                       select hostage as HostageRescued);

                hpu = (from hostage in mdTest.GetEvents <HostagePickedUp>()
                       select hostage as HostagePickedUp);

                dpe = (from disconnection in mdTest.GetEvents <DisconnectedPlayer>()
                       select(disconnection as DisconnectedPlayer));

                te = (from team in mdTest.GetEvents <RoundEndedEventArgs>()
                      select(team as RoundEndedEventArgs).Winner);

                re = (from reason in mdTest.GetEvents <RoundEndedEventArgs>()
                      select(reason as RoundEndedEventArgs).Reason);

                le = (from length in mdTest.GetEvents <RoundEndedEventArgs>()
                      select(length as RoundEndedEventArgs).Length);

                tpe = (from teamPlayers in mdTest.GetEvents <TeamPlayers>()
                       where (teamPlayers as TeamPlayers).Round <= te.Count() // removes extra TeamPlayers if freezetime_end event triggers once a playtest is finished
                       select(teamPlayers as TeamPlayers));

                tes = (from round in mdTest.GetEvents <TeamEquipmentStats>()
                       select(round as TeamEquipmentStats));

                ge = (from nade in mdTest.GetEvents <NadeEventArgs>()
                      select(nade as NadeEventArgs));

                cke = (from chickenKill in mdTest.GetEvents <ChickenKilledEventArgs>()
                       select(chickenKill as ChickenKilledEventArgs));

                sfe = (from shot in mdTest.GetEvents <ShotFired>()
                       select(shot as ShotFired));

                tanookiStats tanookiStats = tanookiStatsCreator(tpe, dpe);


                if (mdTest.passed)
                {
                    // create the json output files using the data gathered
                    var processedData = new ProcessedData()
                    {
                        DemoInformation          = demosInformation[i],
                        SameFilename             = sameFilename,
                        SameFolderStructure      = sameFolderStructure,
                        ParseChickens            = parseChickens,
                        FoldersToProcess         = foldersToProcess,
                        OutputRootFolder         = outputRootFolder,
                        tanookiStats             = tanookiStats,
                        MatchStartValues         = mse,
                        SwitchSidesValues        = sse,
                        MessagesValues           = fme,
                        TeamPlayersValues        = tpe,
                        PlayerKilledEventsValues = pke,
                        PlayerValues             = pe,
                        WeaponValues             = pwe,
                        PenetrationValues        = poe,
                        BombsitePlantValues      = bpe,
                        BombsiteExplodeValues    = bee,
                        BombsiteDefuseValues     = bde,
                        HostageRescueValues      = hre,
                        HostagePickedUpValues    = hpu,
                        TeamValues           = te,
                        RoundEndReasonValues = re,
                        RoundLengthValues    = le,
                        TeamEquipmentValues  = tes,
                        GrenadeValues        = ge,
                        ChickenValues        = cke,
                        ShotsFiredValues     = sfe,
                        WriteTicks           = true
                    };

                    var allStats = mdTest.CreateFiles(processedData);

                    passCount++;

                    Console.WriteLine($"Finished parsing demo {demosInformation[i].DemoName}.\n");
                }
                else
                {
                    Console.WriteLine($"Failed parsing demo {demosInformation[i].DemoName}.\n");
                }
            }

            Console.CursorVisible = true;

            Debug.Blue("========== PROCESSING COMPLETE =========\n");
            DateTime end = DateTime.Now;

            Debug.White("Processing took {0} minutes\n", (end - startTime).TotalMinutes);
            Debug.White("Passed: {0}\n", passCount);
            Debug.White("Failed: {0}\n", demosInformation.Count() - passCount);
        }