public string GetPlayerDetailsLink(Player player)
 {
     if (player.playerInformation != null)
         return player.account_id;
     else
         return "";
 }
 private void ModifyHeroStatsBasedOnGame(MatchDetail match, Player player, PlayerHeroViewModel hero)
 {
     hero.GamesPlayed += 1;
     hero.Kills += player.kills;
     hero.Deaths += player.deaths;
     hero.Assists += player.assists;
     hero.GoldPerMinute += player.gold_per_min;
     hero.XpPerMinute += player.xp_per_min;
     if (_affiliationHelper.PlayerWins(player, match.radiant_win)) { hero.Wins += 1; }
 }
 public string GetPlayerName(Player player)
 {
     if (player.playerInformation != null)
     {
         return player.playerInformation.personaname;
     }
     else
     {
         return player.account_id;
     }
 }
 public string TryGetItemId(int itemSlot, Player matchPlayer)
 {
     try
     {
         return matchPlayer.matchPlayerItems.FirstOrDefault(mpi => mpi.ItemSlot == itemSlot).ItemId.ToString();
     }
     catch
     {
         return "";
     }
 }
 public bool PlayerWins(Player player, bool radiantWins)
 {
     return IsRadiant(player) && radiantWins || !IsRadiant(player) && !radiantWins;
 }
 public bool IsRadiant(Player player)
 {
     return player.player_slot < 5;
 }