using System; using System.Text.RegularExpressions; public class GroomingMessageParser { private Regex reStart = new Regex("You start to tend"); private Regex reEnd = new Regex("You have now tended|shys away and interrupts the action"); private Regex reSkill = new Regex("Animal husbandry increased"); public bool isActionStart(String message) { return reStart.IsMatch(message); } public bool isActionEnd(String message) { return reEnd.IsMatch(message); } public bool isSkillGain(String message) { return reSkill.IsMatch(message); } public String getName() { return "Grooming"; } }