void ExtractQAs(StreamReader stream)
        {
            ConsumeEmptyLines(stream);

            while(
                false == stream.EndOfStream &&
                (stream.Peek() == '?' ||
                 stream.Peek() == '#'))
            {
                // Create & store questions
                QuestionAnswer temp = new QuestionAnswer(stream);
                QuestionAnswers.Add(temp);

                ConsumeEmptyLines(stream);
            }
        }
        private void GoToNextQuestion()
        {
            currentQA = conductor.NextQuestion;

            if(currentQA == null)
            {
                Finish();
                return;
            }

            ShowQuestion();
            UpdateProgressBar();
        }
        private QuestionAnswer GetNextQuestionAnswer()
        {
            QuestionAnswer qa;

            qa = GetRandomElement(unusedQAs);

            if(currentQA != null && unusedQAs.Count > 1)
            {
                while(currentQA == qa)
                {
                    qa = GetRandomElement(unusedQAs);
                }
            }

            currentQA = qa;

            return currentQA;
        }
Beispiel #4
0
 public void MarkAsCorrectlyAnswered(QuestionAnswer qa)
 {
     unusedQAs.Remove(qa);
 }
 public void MarkAsCorrectlyAnswered(QuestionAnswer qa)
 {
     unusedQAs.Remove(qa);
 }