/// <summary> /// Adds question /// </summary> /// <param name="difficulty"></param> /// <param name="questionSentence"></param> /// <param name="rightAnswer"></param> /// <param name="wrongAnswer1"></param> /// <param name="wrongAnswer2"></param> /// <param name="wrongAnswer3"></param> public void AddQuestion(Difficulty difficulty, string questionSentence, string rightAnswer, string wrongAnswer1, string wrongAnswer2, string wrongAnswer3) { switch (difficulty) { case Difficulty.Easy: EasyQuestions.Add(new Question(questionSentence, rightAnswer, wrongAnswer1, wrongAnswer2, wrongAnswer3)); break; case Difficulty.Medium: MediumQuestions.Add(new Question(questionSentence, rightAnswer, wrongAnswer1, wrongAnswer2, wrongAnswer3)); break; case Difficulty.Hard: HardQuestions.Add(new Question(questionSentence, rightAnswer, wrongAnswer1, wrongAnswer2, wrongAnswer3)); break; } }
/// <summary> /// Adds empty question /// </summary> /// <param name="difficulty">Difficulty of the new question</param> /// <returns>Added question</returns> public Question AddQuestion(Difficulty difficulty) { Question question = new Question(); switch (difficulty) { case Difficulty.Easy: EasyQuestions.Add(question); break; case Difficulty.Medium: MediumQuestions.Add(question); break; case Difficulty.Hard: HardQuestions.Add(question); break; } return(question); }