Exemplo n.º 1
0
        public List <LL_LetterData> GetAllTestLetterDataLL(LetterFilters filters = null, bool useMaxJourneyData = false)
        {
            if (filters == null)
            {
                filters = new LetterFilters();
            }

            if (useMaxJourneyData)
            {
                VocabularyAi.LoadCurrentPlaySessionData(AppManager.I.Player.MaxJourneyPosition.ToString());
            }

            var availableLetters = VocabularyAi.SelectData(
                () => vocabularyHelper.GetAllLetters(filters),
                new SelectionParameters(SelectionSeverity.AsManyAsPossible, getMaxData: true, useJourney: useMaxJourneyData)
                , true
                );

            var output_list = new List <LL_LetterData>();

            foreach (var letterData in availableLetters)
            {
                output_list.Add(BuildLetterData_LL(letterData));
            }

            /*if (ConfigAI.verboseTeacher)
             * {
             *  Debug.Log("All test letter data requested to teacher.");
             * }*/

            return(output_list);
        }
Exemplo n.º 2
0
 public QuestionBuilderParameters()
 {
     this.correctChoicesHistory    = PackListHistory.RepeatWhenFull;
     this.wrongChoicesHistory      = PackListHistory.RepeatWhenFull;
     this.useJourneyForCorrect     = true;
     this.useJourneyForWrong       = true;
     this.correctSeverity          = SelectionSeverity.MayRepeatIfNotEnough;
     this.wrongSeverity            = SelectionSeverity.MayRepeatIfNotEnough;
     this.letterEqualityStrictness = LetterEqualityStrictness.LetterOnly;
     this.letterFilters            = new LetterFilters();
     this.wordFilters           = new WordFilters();
     this.phraseFilters         = new PhraseFilters();
     this.sortPacksByDifficulty = true;
 }
Exemplo n.º 3
0
        public LL_LetterData GetRandomTestLetterLL(LetterFilters filters = null, bool useMaxJourneyData = false)
        {
            if (filters == null)
            {
                filters = new LetterFilters();
            }

            List <LetterData> availableLetters = null;

            if (AppManager.I.Player == null)
            {
                availableLetters = vocabularyHelper.GetAllLetters(filters);
            }
            else
            {
                if (useMaxJourneyData)
                {
                    VocabularyAi.LoadCurrentPlaySessionData(AppManager.I.Player.MaxJourneyPosition.ToString());
                }

                availableLetters = VocabularyAi.SelectData(
                    () => vocabularyHelper.GetAllLetters(filters),
                    new SelectionParameters(SelectionSeverity.AsManyAsPossible, getMaxData: true, useJourney: useMaxJourneyData)
                    , true
                    );
            }

            if (giveWarningOnFake)
            {
                Debug.LogWarning("You are using fake data for testing. Make sure to test with real data too.");
                giveWarningOnFake = false;
            }

            var data = availableLetters.RandomSelectOne();

            /*if (ConfigAI.verboseTeacher)
             * {
             *  Debug.Log("Random test Letter requested to teacher: " + data.ToString());
             * }*/

            return(BuildLetterData_LL(data));
        }