예제 #1
0
 public Factoid(Facts.Fact f)
 {
     FactType = f.GetTvarType();
     Relationship = f.Relationship;
     Arg1 = Util.ArgToString(f.Arg1);
     Arg2 = Util.ArgToString(f.Arg2);
     Arg3 = Util.ArgToString(f.Arg3);
     QuestionText = f.QuestionText();
 }
예제 #2
0
        /// <summary>
        /// Displays the engine's results of the interview session.
        /// </summary>
        private static void DisplayResults(Facts.Fact goal)
        {
            Console.WriteLine("\n");

            // Indent and format results
            string tline = "\t" + goal.ValueAsString().Replace("\n","\n\t");

            // For eternal values, only show value
            if (goal.Value().IsEternal)
            {
                tline = tline.Replace("DawnOfTime   ","");
            }

            // Concatenate question and answer
            string result = "\t" + goal.QuestionText() + "\n\n" + tline + "\n";

            // Add result to test case
            Tvar testResult = goal.GetFunction().Invoke();
            AkkTest.CloseUnitTest(testResult, goal.Relationship);

            Console.WriteLine(result);
        }