public override IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; var builderParams = new QuestionBuilderParameters(); switch (Variation) { case MixedLettersVariation.Alphabet: builderParams.useJourneyForCorrect = false; // Force no journey, or the minigame will block builder = new AlphabetQuestionBuilder(parameters: builderParams); break; case MixedLettersVariation.BuildWord: builderParams.wordFilters.excludeDipthongs = true; builder = new LettersInWordQuestionBuilder(nPacks, maximumWordLength: 6, useAllCorrectLetters: true, parameters: builderParams); break; default: throw new ArgumentOutOfRangeException(); } return(builder); }
public IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nWrong = 4; var builderParams = new Teacher.QuestionBuilderParameters(); switch (Variation) { case ThrowBallsVariation.letters: builder = new RandomLettersQuestionBuilder(nPacks, 1, nWrong: nWrong, firstCorrectIsQuestion: true, parameters: builderParams); break; case ThrowBallsVariation.words: builderParams.wordFilters.requireDrawings = true; builder = new RandomWordsQuestionBuilder(nPacks, 1, nWrong, firstCorrectIsQuestion: true, parameters: builderParams); break; case ThrowBallsVariation.lettersinword: builder = new LettersInWordQuestionBuilder(nPacks: nPacks, maximumWordLength: 7, nWrong: nWrong, useAllCorrectLetters: true, parameters: builderParams); break; } return(builder); }
public override IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nCorrect = 6; int nWrong = 7; // Debug.LogWarning("SetupBuilder " + Variation.ToString()); var builderParams = new QuestionBuilderParameters(); builderParams.correctSeverity = SelectionSeverity.AsManyAsPossible; switch (Variation) { case EggVariation.LetterName: builder = new RandomLettersQuestionBuilder(nPacks, nCorrect, nWrong, parameters: builderParams); break; case EggVariation.BuildWord: builderParams.wordFilters.excludeDipthongs = true; builder = new LettersInWordQuestionBuilder(nPacks, nWrong: nWrong, useAllCorrectLetters: true, parameters: builderParams); break; case EggVariation.LetterPhoneme: builder = new RandomLetterAlterationsQuestionBuilder(nPacks, 1, 3, parameters: builderParams, letterAlterationFilters: LetterAlterationFilters.FormsAndPhonemesOfMultipleLetters_OneForm, avoidWrongLettersWithSameSound: true); break; default: throw new ArgumentOutOfRangeException(); } return(builder); }
public IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nCorrect = 1; int nWrong = 5; var builderParams = new Teacher.QuestionBuilderParameters(); switch (Variation) { case ToboganVariation.LetterInAWord: builder = new LettersInWordQuestionBuilder(nPacks, nCorrect, nWrong, parameters: builderParams); break; case ToboganVariation.SunMoon: builder = new WordsBySunMoonQuestionBuilder(nPacks, parameters: builderParams); break; } if (builder == null) { throw new System.Exception("No question builder defined for variation " + Variation.ToString()); } return(builder); }
public void LettersInWordTest() { var builderParams = SetupFakeGame(); var builder = new LettersInWordQuestionBuilder(nPacks: nPacks, nCorrect: nCorrect, nWrong: nWrong, useAllCorrectLetters: true, parameters: builderParams); builder.CreateAllQuestionPacks(); }
public override IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nCorrect = 1; int nWrong = 5; var builderParams = InitQuestionBuilderParamaters(); switch (Variation) { case ToboganVariation.LetterInWord: builderParams.wordFilters.excludeLetterVariations = true; builderParams.wordFilters.excludeDipthongs = true; builder = new LettersInWordQuestionBuilder(nPacks, nCorrect: nCorrect, nWrong: nWrong, parameters: builderParams); break; case ToboganVariation.SunMoon: builder = new WordsBySunMoonQuestionBuilder(nPacks, parameters: builderParams); break; default: throw new ArgumentOutOfRangeException(); } return(builder); }
public override IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nCorrect = 4; int nWrong = 4; var builderParams = new QuestionBuilderParameters(); switch (Variation) { case FastCrowdVariation.Alphabet: builder = new AlphabetQuestionBuilder(); break; case FastCrowdVariation.Counting: builder = new OrderedWordsQuestionBuilder(WordDataCategory.Number, builderParams, false); break; case FastCrowdVariation.LetterName: // Only base letters builderParams.letterFilters.excludeDiacritics = LetterFilters.ExcludeDiacritics.All; builderParams.wrongSeverity = SelectionSeverity.AsManyAsPossible; builder = new RandomLettersQuestionBuilder(nPacks, 5, 0, parameters: builderParams); break; case FastCrowdVariation.LetterForm: // @note: we pass 4 as nCorrect, so we get all the four forms of a single letter, which will be shown one after the other builder = new RandomLetterAlterationsQuestionBuilder(nPacks, 4, nWrong, letterAlterationFilters: LetterAlterationFilters.FormsOfSingleLetter); break; case FastCrowdVariation.BuildWord: builderParams.wordFilters.excludeColorWords = true; builderParams.wordFilters.requireDrawings = true; builderParams.wordFilters.excludeDipthongs = true; builder = new LettersInWordQuestionBuilder(nPacks, nWrong: nWrong, useAllCorrectLetters: true, parameters: builderParams); break; case FastCrowdVariation.Word: builderParams.wordFilters.excludeColorWords = true; builderParams.wordFilters.requireDrawings = true; builder = new RandomWordsQuestionBuilder(nPacks, nCorrect, nWrong, parameters: builderParams); break; default: throw new ArgumentOutOfRangeException(); } return(builder); }
public IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; var builderParams = new Teacher.QuestionBuilderParameters(); switch (Variation) { case MixedLettersVariation.Alphabet: builder = new AlphabetQuestionBuilder(parameters: builderParams); break; case MixedLettersVariation.Spelling: builder = new LettersInWordQuestionBuilder(nPacks, maximumWordLength: 6, useAllCorrectLetters: true, parameters: builderParams); break; } return(builder); }
public override IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nWrong = 4; var builderParams = InitQuestionBuilderParamaters(); switch (Variation) { case ThrowBallsVariation.LetterName: builderParams.letterFilters.excludeDiacritics = LetterFilters.ExcludeDiacritics.All; builder = new RandomLettersQuestionBuilder(nPacks, 1, nWrong: nWrong, firstCorrectIsQuestion: true, parameters: builderParams); break; case ThrowBallsVariation.LetterAny: var letterAlterationFilters = LetterAlterationFilters.FormsAndPhonemesOfMultipleLetters; builder = new RandomLetterAlterationsQuestionBuilder(nPacks, 1, nWrong: nWrong, letterAlterationFilters: letterAlterationFilters, parameters: builderParams); break; case ThrowBallsVariation.Word: case ThrowBallsVariation.Image: builderParams.wordFilters.requireDrawings = true; builder = new RandomWordsQuestionBuilder(nPacks, 1, nWrong, firstCorrectIsQuestion: true, parameters: builderParams); break; case ThrowBallsVariation.BuildWord: builderParams.wordFilters.requireDrawings = true; builderParams.wordFilters.excludeDipthongs = true; builderParams.letterFilters.includeSpecialCharacters = true; builder = new LettersInWordQuestionBuilder(7, maximumWordLength: 7, nWrong: nWrong, useAllCorrectLetters: true, parameters: builderParams); break; default: throw new ArgumentOutOfRangeException(); } return(builder); }
public override IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 6; int nCorrect = 3; int nWrong = 8; var builderParams = InitQuestionBuilderParamaters(); switch (Variation) { case BalloonsVariation.Spelling: builderParams.wordFilters.requireDrawings = true; builderParams.letterFilters.includeSpecialCharacters = true; builder = new LettersInWordQuestionBuilder(nPacks, useAllCorrectLetters: true, nWrong: nWrong, parameters: builderParams); break; case BalloonsVariation.Words: case BalloonsVariation.Image: builderParams.wordFilters.requireDrawings = true; builder = new RandomWordsQuestionBuilder(nPacks, 1, nWrong, firstCorrectIsQuestion: true, parameters: builderParams); break; case BalloonsVariation.LetterInWord: builderParams.wordFilters.excludeDipthongs = true; builder = new WordsWithLetterQuestionBuilder(nPacks, nPacksPerRound: 1, nCorrect: nCorrect, nWrong: nWrong, parameters: builderParams); break; case BalloonsVariation.Counting: builderParams.wordFilters.allowedCategories = new[] { WordDataCategory.Numbers }; builder = new OrderedWordsQuestionBuilder(builderParams); break; default: throw new ArgumentOutOfRangeException(); } return(builder); }
public IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nCorrect = 4; int nWrong = 4; var builderParams = new Teacher.QuestionBuilderParameters(); switch (Variation) { case FastCrowdVariation.Alphabet: builder = new AlphabetQuestionBuilder(); break; case FastCrowdVariation.Counting: builder = new OrderedWordsQuestionBuilder(Db.WordDataCategory.NumberOrdinal); break; case FastCrowdVariation.Letter: builder = new RandomLettersQuestionBuilder(nPacks, 1, nWrong, firstCorrectIsQuestion: true); break; case FastCrowdVariation.Spelling: builderParams.wordFilters.excludeColorWords = true; builderParams.wordFilters.requireDrawings = true; builder = new LettersInWordQuestionBuilder(nPacks, nWrong: nWrong, useAllCorrectLetters: true, parameters: builderParams); break; case FastCrowdVariation.Words: builderParams.wordFilters.excludeColorWords = true; builderParams.wordFilters.requireDrawings = true; builder = new RandomWordsQuestionBuilder(nPacks, nCorrect, nWrong, parameters: builderParams); break; } return(builder); }
public IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nCorrect = 1; int nWrong = 5; var builderParams = new Teacher.QuestionBuilderParameters(); switch (Variation) { case MissingLetterVariation.MissingLetter: builder = new LettersInWordQuestionBuilder(nPacks, nCorrect, nWrong, parameters: builderParams); break; case MissingLetterVariation.MissingWord: builderParams.phraseFilters.requireWords = true; builderParams.phraseFilters.requireAtLeastTwoWords = true; builder = new WordsInPhraseQuestionBuilder(nPacks, nCorrect, nWrong, parameters: builderParams); break; } return(builder); }
public override IQuestionBuilder SetupBuilder() { IQuestionBuilder builder = null; int nPacks = 10; int nCorrect = 4; int nWrong = 4; var builderParams = InitQuestionBuilderParamaters(); switch (Variation) { case FastCrowdVariation.Alphabet: builder = new AlphabetQuestionBuilder(); break; case FastCrowdVariation.Counting: builderParams.wordFilters.allowedCategories = new[] { WordDataCategory.Numbers }; builder = new OrderedWordsQuestionBuilder(builderParams); break; case FastCrowdVariation.OrderedImage_Numbers: builder = CreateOrderedImageBuilder(builderParams, WordDataCategory.Numbers); break; case FastCrowdVariation.OrderedImage_Colors: builder = CreateOrderedImageBuilder(builderParams, WordDataCategory.Colors); break; case FastCrowdVariation.OrderedImage_Months: builder = CreateOrderedImageBuilder(builderParams, WordDataCategory.Months); break; case FastCrowdVariation.OrderedImage_Days_Seasons: builder = CreateOrderedImageBuilder(builderParams, WordDataCategory.Days, WordDataCategory.Seasons); break; case FastCrowdVariation.LetterName: // Only base letters builderParams.letterFilters.excludeDiacritics = LetterFilters.ExcludeDiacritics.All; builderParams.wrongSeverity = SelectionSeverity.AsManyAsPossible; builder = new RandomLettersQuestionBuilder(nPacks, 5, 0, parameters: builderParams); break; case FastCrowdVariation.LetterForm: // @note: we pass 4 as nCorrect, so we get all the four forms of a single letter, which will be shown one after the other builder = new RandomLetterAlterationsQuestionBuilder(nPacks, 4, nWrong, letterAlterationFilters: LetterAlterationFilters.FormsOfSingleLetter, parameters: builderParams); break; case FastCrowdVariation.CategoryForm: // @note: we pass 4 as nCorrect, so we get all the four forms from a single category builderParams.wordFilters.allowedCategories = new[] { WordDataCategory.Seasons }; builderParams.wordFilters.requireDrawings = true; builder = new RandomWordsQuestionBuilder(nPacks, 4, nWrong, true, builderParams); break; case FastCrowdVariation.BuildWord: builderParams.wordFilters.requireDrawings = true; builderParams.wordFilters.excludeDipthongs = true; builderParams.letterFilters.includeSpecialCharacters = true; builderParams.letterFilters.includeAccentedLetters = true; builder = new LettersInWordQuestionBuilder(7, nWrong: nWrong, useAllCorrectLetters: true, removeAccents: false, parameters: builderParams); break; case FastCrowdVariation.Word: case FastCrowdVariation.Image: builderParams.wordFilters.requireDrawings = true; builder = new RandomWordsQuestionBuilder(nPacks, nCorrect, nWrong, parameters: builderParams); break; default: throw new ArgumentOutOfRangeException(); } return(builder); }
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); }