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