public static double CalculatePerformanceAverage(Player player)
{
var ave = player.PlayerRecords.Any()
? player.PlayerRecords.Average(
stat => CalculatePerformance(stat.PlayedGames, stat.Won, stat.Lost, stat.Tied, stat.Assists, stat.Goals, stat.AllowedGoals))
: 0;
return Math.Round(ave, 3);
}