Exemplo n.º 1
0
 /// <summary>
 /// Uses the pronoun set to generate the appropriate form of the verb
 /// to agree with the pronouns.
 /// </summary>
 /// <param name="verb">the verb to conjugate</param>
 /// <param name="form">the form of the subject of the sentence</param>
 /// <returns>the conjugated verb</returns>
 public static string GetForm(VerbSet verb, PronounSet form)
 {
     if (form == PronounSet.GetFemaleSet() || form == PronounSet.GetMaleSet() || form == PronounSet.GetNeuterSet())
     {
         return verb.singularForm;
     }
     else if (form == PronounSet.GetPluralSet())
     {
         return verb.pluralForm;
     }
     else if (form == PronounSet.GetSecondPersonSet())
     {
         return verb.secondPersonForm;
     }
     return null;
 }
Exemplo n.º 2
0
 /// <summary>
 /// This override makes the function use the <see cref="Actor"/>'s own
 /// <see cref="PronounSet"/> for selecting the verb form.
 /// </summary>
 /// <param name="verb">the verb to conjugate</param>
 /// <returns>the conjugated verb</returns>
 public override string GetConjugatedVerb(VerbSet verb)
 {
     return VerbSet.GetForm(verb, this.pronouns);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Prints a generic message reporting a simple action with two parameters.
 /// </summary>
 /// <param name="actor">the <see cref="Actor"/> performing the action</param>
 /// <param name="verb">the action being performed</param>
 /// <param name="item1">the first <see cref="Thing"/> the action is performed on</param>
 /// <param name="separator">word or phrase separating the two parameters</param>
 /// <param name="item2">the second <see cref="Thing"/> the action is performed on</param>
 public static void ReportIfVisible(Actor actor, VerbSet verb, Thing item1, string separator, Thing item2)
 {
     ReportIfVisible(actor,
         StringManipulator.CapitalizeFirstLetter(actor.GetSpecificName())
         + ' ' + actor.GetConjugatedVerb(verb)
         + ' ' + item1.GetSpecificName()
         + separator + item2.GetSpecificName() + '.');
 }
Exemplo n.º 4
0
 /// <summary>
 /// Conjugates a given verb, using the <see cref="Thing"/> as the
 /// subject.
 /// </summary>
 /// 
 /// <param name="verb">the verb to conjugate</param>
 /// 
 /// <returns>the conjugated verb</returns>
 public virtual string GetConjugatedVerb(VerbSet verb)
 {
     return VerbSet.GetForm(verb, (this.isPlural) ? PronounSet.GetPluralSet() : PronounSet.GetNeuterSet());
 }