internal Score GetCumulativeQuizScore() { var totalPercent = 0; var totalPoints = 0; var i = 1; foreach (var score in _scores) { if(score.Type == ActivityType.Quiz) { totalPercent = (totalPercent + score.Percentage) / i; totalPoints += score.Value; i++; } } var s = new Score(_scores[0].PlayerName,ActivityType.Quiz, totalPoints, "Cumulative Quiz Score"){Percentage = totalPercent}; return s; }
public void AddScore(Score s) { _scores.Add(s); }
public void ReportScore(Score s) { _score = s; }