public int GetPointsAvailable(int currentHole)
{
if (currentHole == 1)
{
_pointsAvailable = _allHoles.Single(h => h.Id == 1).Par;
return _pointsAvailable.Value;
}
else
{
int totalPoints = _allHoles.Where(h => h.Id <= currentHole).Sum(h => h.Par);
int totalPointsTaken = Shots.Where(s => s.Hole.Id < currentHole).Sum(s => s.Points);
_pointsAvailable = totalPoints - totalPointsTaken;
return _pointsAvailable.Value;
}
}