public bool ValidateAnswer(Answer answer)
        {
            if(IsAnswerCorrect(answer))
            {
                UpdateCurrentPuzzle();
                return true;
            }

            return false;
        }
 protected override bool IsAnswerCorrect(Answer answer)
 {
     StringAnswer stringAnswer = (StringAnswer)answer;
     return (
         string.Compare(stringAnswer.Value, TextAnswer.Answer, CultureInfo.CurrentCulture, CompareOptions.OrdinalIgnoreCase) == 0);
 }
 protected abstract bool IsAnswerCorrect(Answer answer);
예제 #4
0
 protected override bool IsAnswerCorrect(Answer answer)
 {
     IntAnswer intAnswer = (IntAnswer)answer;
     return intAnswer.Value == Mcq.AnswerIndex;
 }