Exemple #1
0
        public string GoOutAnnoucement()
        {
            PureFact factJob = (PureFact)factsManager.GetByName("UserHasJob");

            bool userWorks = factJob.IsAnswered && this.IsYes(factJob.Value);

            var options = (new string[]
                           { "You should go out this evening with your friends.",
                             "Call somebody and go for a drink this evening.",
                             "Today is " + KorraModelHelper.DayOfWeek() + ". It is pizza day. You better have something to eat outside." //TODO: check if it evening, or lunch time
                           }).ToList();

            if (userWorks)
            {
                options.Add("Call some friends and go for a drink after work.");
                options.Add("Going to a bar after work sounds like a great idea");
                options.Add("Do you have plans for this evening after work? You better go out and have a drink at the local pub.");
            }
            else
            {
                options.Add("Call some friends and go for a drink.");
                options.Add("Going to a bar this evening sounds like a great idea.");
                options.Add("Do you have plans for this evening? You better go out and have a drink at the local pub.");
            }

            //choose a statement randomly
            string text = KorraModelHelper.GetChance(options.ToArray(), lastGoOutAnnouncementUsed);

            lastGoOutAnnouncementUsed = text;

            return(text);
        }