예제 #1
0
        /*
         *  SAY etc.
         */
        public static string vsay(State globals)
        {
            int wtype, wval;

            wtype = wval = 0;
            Tuple <bool, string> analysisResults = English.analyze(globals.word1, ref wtype, ref wval);

            return(analysisResults.Item2 + $"Okay.\n{(wval == Definitions.SAY ? globals.word2 : globals.word1)}\n");
        }
예제 #2
0
        /*
         *  Routine to print word corresponding to object
         */
        public static string probj(State globals)
        {
            int wtype, wval;

            wtype = wval = 0;
            Tuple <bool, string> analysisResult = English.analyze(globals.word1, ref wtype, ref wval);

            return(analysisResult.Item2 + Environment.NewLine + (wtype == 1 ? globals.word1 : globals.word2));
        }
예제 #3
0
        /*
         *  Routine to indicate no reasonable
         *  object for verb found.  Used mostly by
         *  intransitive verbs.
         */
        public static string needobj(State globals)
        {
            int wtype, wval;

            wtype = wval = 0;

            Tuple <bool, string> analysisResult = English.analyze(globals.word1, ref wtype, ref wval);

            return(analysisResult.Item2 + string.Format($"{(wtype == 2 ? globals.word1 : globals.word2)} what?\n"));
        }