public RandomLetterAlterationsQuestionBuilder(int nPacks, int nCorrect = 1, int nWrong = 0,
                                                      LetterAlterationFilters letterAlterationFilters = null,
                                                      bool avoidWrongLettersWithSameSound             = false,
                                                      QuestionBuilderParameters parameters            = null
                                                      )
        {
            if (letterAlterationFilters == null)
            {
                letterAlterationFilters = new LetterAlterationFilters();
            }

            if (parameters == null)
            {
                parameters = new QuestionBuilderParameters();
            }

            this.nPacks     = nPacks;
            this.nCorrect   = nCorrect;
            this.nWrong     = nWrong;
            this.parameters = parameters;
            this.letterAlterationFilters        = letterAlterationFilters;
            this.avoidWrongLettersWithSameSound = avoidWrongLettersWithSameSound;

            // Forced filters
            // We need only base letters as the basis here
            this.parameters.letterFilters.excludeDiacritics       = LetterFilters.ExcludeDiacritics.All;
            this.parameters.letterFilters.excludeLetterVariations = LetterFilters.ExcludeLetterVariations.All;
            this.parameters.letterFilters.excludeDiphthongs       = true;
        }
        public LetterAlterationsInWordsQuestionBuilder(int nPacksPerRound, int nRounds,
                                                       int nWrongs = 4,
                                                       WordDataCategory category = WordDataCategory.None,
                                                       int maximumWordLength     = 20,
                                                       LetterAlterationFilters letterAlterationFilters = null,
                                                       QuestionBuilderParameters parameters            = null)
        {
            if (parameters == null)
            {
                parameters = new QuestionBuilderParameters();
            }
            this.nPacksPerRound          = nPacksPerRound;
            this.nRounds                 = nRounds;
            this.nWrongs                 = nWrongs;
            this.category                = category;
            this.maximumWordLength       = maximumWordLength;
            this.parameters              = parameters;
            this.letterAlterationFilters = letterAlterationFilters;

            // Forced parameters
            this.parameters.letterFilters.excludeDiacritics       = LetterFilters.ExcludeDiacritics.All;
            this.parameters.letterFilters.excludeLetterVariations = LetterFilters.ExcludeLetterVariations.All;
        }
예제 #3
0
        public LetterAlterationsInWordsQuestionBuilder(int nPacksPerRound, int nRounds,
                                                       int nWrongs           = 4,
                                                       int maximumWordLength = 20,
                                                       bool keepBasesOnly    = true,
                                                       LetterAlterationFilters letterAlterationFilters = null,
                                                       QuestionBuilderParameters parameters            = null)
        {
            if (parameters == null)
            {
                parameters = new QuestionBuilderParameters();
            }
            this.nPacksPerRound          = nPacksPerRound;
            this.nRounds                 = nRounds;
            this.nWrongs                 = nWrongs;
            this.maximumWordLength       = maximumWordLength;
            this.parameters              = parameters;
            this.letterAlterationFilters = letterAlterationFilters;
            this.keepBasesOnly           = keepBasesOnly;

            // Forced parameters
            this.parameters.letterFilters.excludeDiacritics       = LetterFilters.ExcludeDiacritics.All;
            this.parameters.letterFilters.excludeLetterVariations = LetterFilters.ExcludeLetterVariations.All;
        }