Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="value">is the answer to question: UserRelationshipFirstStep</param>
        /// <returns></returns>
        public string ProcessNationality(string value, out bool isValid, out string faceExpr)
        {
            bool validNationality = KorraModelHelper.CheckValidNationality(value);

            isValid  = true;
            faceExpr = "";

            bool validCountryName = false;

            if (!validNationality)
            {
                validCountryName = KorraModelHelper.CheckValidCountryName(value);
            }

            string[] uk = { "uk", "english", "scot", "welsh", "irish", "scottish", "united kingdom", "british" };
            string[] sc = { "zerg", "protoss", "terran" };
            string[] st = { "vulcan", "romulan", "klingon", "borg" };

            if (!validNationality && !validCountryName && !uk.Contains(value.ToLower()) && !sc.Contains(value.ToLower()))
            {
                //FlagsShared.RequestSurpriseExpression = true;
                faceExpr = FaceExp.SurpriseOnStartTalking;
                isValid  = false;
                return("Sorry, I could not understand your nationality.");
            }

            else
            {
                if (value.ToLower() == "french" || value.ToLower() == "france")
                {
                    return("Hands down, best wines and cheese.");
                }
                else if (value.ToLower() == "american" || value.ToLower() == "us" || value.ToLower() == "usa")
                {
                    return("<prosody pitch=\"+0%\">Yeah, the problem with political jokes is that <break time=\"800ms\"/>they get elected.</prosody>"); //maybe it should be in jokes list
                }
                else if (value.ToLower() == "canadian" || value.ToLower() == "canada")
                {
                    return("<prosody pitch=\"+0%\">What do you call a sophisticated American?<break time=\"900ms\"/> A canadian.</prosody>"); //maybe it should be in jokes list
                }
                else if (uk.Contains(value.ToLower()))
                {
                    return("<prosody pitch=\"+0%\">What does the Loch Ness monster eat?<break time=\"900ms\"/> Fish and ships.</prosody>"); //maybe it should be in jokes list
                }
                else if (sc.Contains(value.ToLower()))
                {
                    return("<prosody pitch=\"+0%\">Oh. A Starcraft fan. <break time=\"500ms\"/>Shields up, weapons online!</prosody>"); //maybe it should be in jokes list
                }
                else if (st.Contains(value.ToLower()))
                {
                    return("<prosody pitch=\"+0%\">Oh. A Star Trek fan. <break time=\"500ms\"/>Resistance is futile</prosody>"); //maybe it should be in jokes list
                }
                return("");
            }
        }