示例#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 <int, List <AdvancedPosition> > getPlayerPathInAllRounds(Player player) => parser.GetPlayerPathInAllRounds(player);