Exemple #1
0
        private void PoseANewQuestion()
        {
            QuestionItem question = null;

            if (_provider.TryGetQuestion(ref question))
            {
                _controller.PoseAQuestion(question);
            }
        }
 public bool TryGetQuestion(ref QuestionItem question)
 {
     if (!_questions.Value.Any())
     {
         return(false);
     }
     question = GetQuestion();
     return(true);
 }
Exemple #3
0
        public void PoseAQuestion(QuestionItem question)
        {
            if (question == null)
            {
                throw new Exception();
            }

            _view.BroadcastMessage(question.Question);
            _model = QuestionStateFactory.BuildQuestionState(question);
        }
Exemple #4
0
 public QuestionState(QuestionItem item, IAnswerMatchingStrategy matchingStrategy)
 {
     this.item         = item;
     _matchingStrategy = matchingStrategy;
 }
Exemple #5
0
 public static QuestionState BuildQuestionState(QuestionItem question)
 {
     return(new QuestionState(question, new FuzzyAnswerMatchStrategy()));
 }
 public void AddQuestion(QuestionItem questionItem)
 {
     _questions.Value.Enqueue(questionItem);
 }