public void PhraseQuestions() { var builderParams = SetupFakeGame(); var builder = new PhraseQuestionsQuestionBuilder(nPacks: nPacks, nCorrect: nCorrect, nWrong: nWrong, parameters: builderParams); builder.CreateAllQuestionPacks(); }
private void SimulateQuestionBuilder(QuestionBuilderType builderType) { LetterAlterationFilters letterAlterationFilters = null; switch (lettersVariationChoice) { case 0: letterAlterationFilters = LetterAlterationFilters.FormsOfSingleLetter; break; case 1: letterAlterationFilters = LetterAlterationFilters.FormsOfMultipleLetters; break; case 2: letterAlterationFilters = LetterAlterationFilters.MultipleLetters; break; case 3: letterAlterationFilters = LetterAlterationFilters.PhonemesOfSingleLetter; break; case 4: letterAlterationFilters = LetterAlterationFilters.PhonemesOfMultipleLetters; break; case 5: letterAlterationFilters = LetterAlterationFilters.FormsAndPhonemesOfMultipleLetters; break; } var builderParams = SetupBuilderParameters(); IQuestionBuilder builder = null; switch (builderType) { case QuestionBuilderType.RandomLetters: builder = new RandomLettersQuestionBuilder(nPacks: nPacks, nCorrect: nCorrectAnswers, nWrong: nWrongAnswers, firstCorrectIsQuestion: true, parameters: builderParams); break; case QuestionBuilderType.RandomLetterForms: builder = new RandomLetterAlterationsQuestionBuilder(nPacks: nPacks, nCorrect: nCorrectAnswers, nWrong: nWrongAnswers, letterAlterationFilters: letterAlterationFilters, parameters: builderParams); break; case QuestionBuilderType.Alphabet: builder = new AlphabetQuestionBuilder(parameters: builderParams); break; case QuestionBuilderType.LettersBySunMoon: builder = new LettersBySunMoonQuestionBuilder(nPacks: nPacks, parameters: builderParams); break; case QuestionBuilderType.LettersByType: builder = new LettersByTypeQuestionBuilder(nPacks: nPacks, parameters: builderParams); break; case QuestionBuilderType.LettersInWord: builder = new LettersInWordQuestionBuilder(nRounds: nPacks, nPacksPerRound: nPacksPerRound, nCorrect: nCorrectAnswers, nWrong: nWrongAnswers, useAllCorrectLetters: true, parameters: builderParams); break; case QuestionBuilderType.LetterFormsInWords: builder = new LetterFormsInWordsQuestionBuilder(nPacks, nPacksPerRound, parameters: builderParams); break; case QuestionBuilderType.LetterAlterationsInWords: builder = new LetterAlterationsInWordsQuestionBuilder(nPacks, nPacksPerRound, parameters: builderParams, letterAlterationFilters: letterAlterationFilters); break; case QuestionBuilderType.CommonLettersInWords: builder = new CommonLetterInWordQuestionBuilder(nPacks: nPacks, nWrong: nWrongAnswers, parameters: builderParams); break; case QuestionBuilderType.RandomWords: builder = new RandomWordsQuestionBuilder(nPacks: nPacks, nCorrect: nCorrectAnswers, nWrong: nWrongAnswers, firstCorrectIsQuestion: true, parameters: builderParams); break; case QuestionBuilderType.OrderedWords: builderParams.wordFilters.allowedCategories = new[] { WordDataCategory.Numbers }; builder = new OrderedWordsQuestionBuilder(parameters: builderParams); break; case QuestionBuilderType.WordsWithLetter: builder = new WordsWithLetterQuestionBuilder(nRounds: nPacks, nPacksPerRound: nPacksPerRound, nCorrect: nCorrectAnswers, nWrong: nWrongAnswers, parameters: builderParams); break; case QuestionBuilderType.WordsByForm: builder = new WordsByFormQuestionBuilder(nPacks: nPacks, parameters: builderParams); break; case QuestionBuilderType.WordsByArticle: builder = new WordsByArticleQuestionBuilder(nPacks: nPacks, parameters: builderParams); break; case QuestionBuilderType.WordsBySunMoon: builder = new WordsBySunMoonQuestionBuilder(nPacks: nPacks, parameters: builderParams); break; case QuestionBuilderType.WordsInPhrase: builder = new WordsInPhraseQuestionBuilder(nPacks: nPacks, nCorrect: nCorrectAnswers, nWrong: nWrongAnswers, useAllCorrectWords: false, usePhraseAnswersIfFound: true, parameters: builderParams); break; case QuestionBuilderType.PhraseQuestions: builder = new PhraseQuestionsQuestionBuilder(nPacks: nPacks, nWrong: nWrongAnswers, parameters: builderParams); break; } var questionPacksGenerator = new QuestionPacksGenerator(); questionPacksGenerator.GenerateQuestionPacks(builder); }