Пример #1
0
    public void testReplayProperlyParsed()
    {
        csgoParser parser = new csgoParser(pathMirageDemo);

        parser.ParseAllRounds();



        Assert.AreEqual(Team.CounterTerrorist, parser.GetWinningTeam());
        Assert.AreEqual(25, parser.RoundsPlayed);
        Assert.AreEqual(25, parser.GetPlayerPathInAllRounds(parser.Players[0]).Keys.Count);

        for (int i = 0; i < parser.RoundsPlayed; i++)
        {
            var allPlayerPathsInRound = parser.GetAllPlayerPathInRound(i);

            //for every tick in a round a position is saved
            var ticksPerRound = parser.GetTicksPerRound(i);

            List <AdvancedPosition> path = allPlayerPathsInRound.getFirstKey();

            Assert.AreEqual(ticksPerRound, path.Count);


            //10 player path are saved each round
            Assert.AreEqual(allPlayerPathsInRound.Keys.Count, 10);
        }
    }
Пример #2
0
 public Dictionary <Player, List <AdvancedPosition> > getAllPlayerPathInRound(int round) => parser.GetAllPlayerPathInRound(round);