コード例 #1
0
        public static ConjugationOptions GetRandomConjugationOption()
        {
            var conjugations = Verb.AllConjugations();
            var conjugation  = conjugations[r.Next(conjugations.Count)];
            var pronouns     = Enum.GetValues(typeof(Pronoun)).Cast <Pronoun>().ToList();
            var mood         = conjugation.Item1;
            var tense        = conjugation.Item2;

            if (mood == Mood.Imperative)
            {
                pronouns = PronounDictionary.ImperativePronouns();
            }
            var pronoun = (Pronoun)pronouns[r.Next(pronouns.Count)];

            return(new ConjugationOptions(mood, tense, pronoun));
        }