Beispiel #1
0
 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;
 }
Beispiel #2
0
 public void AddScore(Score s)
 {
     _scores.Add(s);
 }
Beispiel #3
0
 public void ReportScore(Score s)
 {
     _score = s;
 }