public bool IsMatchingRule(string verb, TenseEnum tense) { if (tense == TenseEnum.Present && verb.EndsWith("er")) { return(true); } return(false); }
public string GetConjugatedForm(PersonalPronounEnum pronoun, string verb, TenseEnum tense) { foreach (var rule in rules) { if (rule.IsMatchingRule(verb, tense)) { return(rule.Conjugate(verb, pronoun)); } } throw new System.Exception("I do not know how to conjugate this yet. Please implement more rules."); }