Beispiel #1
0
 public int GetScore(Quiz which)
 {
     try {
         return(Scores [Quizzes.IndexOf(which)]);
     } catch (IndexOutOfRangeException) {
         return(0);
     }
 }
Beispiel #2
0
        public void SetScore(Quiz which, bool correctlySolved)
        {
            var index = Quizzes.IndexOf(which);

            Log.Debug(TAG, string.Format("Setting score for {0} with index {1}", which, index));
            if (index == -1)
            {
                return;
            }

            Scores [index] = correctlySolved ? GoodScore : NoScore;
        }