private IList <MatchStatistics> GetMatchPlayerStatistics(CDataGCCStrike15_v2_MatchInfo matchInfo) { var roundStats = matchInfo.roundstatsall; var finalRoundStats = roundStats.Last(); var accountIds = finalRoundStats.reservation.account_ids; var players = new List <MatchStatistics>(); for (var i = 0; i < accountIds.Count; i++) { var steamId = SteamIdDecoder.ToSteamId(accountIds[i]); var playerStatistics = new MatchStatistics { SteamID = steamId, InitialSide = i < 5 ? Side.CounterTerrorists : Side.Terrorists }; players.Add(playerStatistics); } return(players); }
public void ToSteamId_ValidAccountId_ReturnsCorrectSteamId(uint accountId, long expectedSteamId) { var steamId = SteamIdDecoder.ToSteamId(accountId); Assert.Equal(expectedSteamId, steamId); }