public ScoreBoardLine GetScoreBoardLine(Game game, Player player) { ScoreBoardLine line = new ScoreBoardLine(); line.PlayerName = player.Name; line.TeamName = (player.Team != null) ? player.Team.Name : string.Empty; foreach (Round round in game.Rounds) { foreach (Frag frag in round.Frags) { if (frag.Killer.SteamId == player.SteamId) { line.Kills++; if (frag.Headshot) { line.Headshot++; } } if (frag.Assist != null && frag.Assist.SteamId == player.SteamId) { line.Assist++; } if (frag.Victim.SteamId == player.SteamId) { line.Deaths++; } } if (round.Mvp != null && round.Mvp.SteamId == player.SteamId) { line.Mvp++; } } PlayerRatingData data = ratingService.ComputeRatingData(game, player); line._1K = data._1K; line._2K = data._2K; line._3K = data._3K; line._4K = data._4K; line._5K = data._5K; line.Rating = ratingService.ComputeRating(game.Rounds.Count, data); return(line); }