public Question(byte[] bytes, ref int position) { Title = DataManager.ReadStringFromByteArray(bytes, ref position); int numberOfAnswers = DataManager.ReadLengthForNextSection(bytes, ref position); int index = 0; for (index = 0; index < numberOfAnswers; index++) { Answer answer = new Answer(bytes, ref position); _answers.Add(answer); } }
internal bool AnswerQuestion(Answer a) { a.Choose(); _hasAnswer = true; if (a.IsCorrect()) { _isCorrect = true; return true; } _isCorrect = false; return false; }
private void AnswerTheQuestion(Answer answer) { if(_currentQuestion.AnswerQuestion(answer)) { _currentQuizScore.Value += 1; } AdvanceQuestion(); }