Пример #1
0
        public ScriptVariable Call(IList <ScriptVariable> args, ScriptConsole console)
        {
            StringWriter writer = new StringWriter();

            foreach (var arg in args)
            {
                if (arg.IsNull())
                {
                    writer.Write("null");
                }
                else
                {
                    writer.Write(arg.ToString());
                }
            }
            string str = writer.ToString();

            console.Print(str);
            return(new NumberVariable(str.Length));
        }
Пример #2
0
 public void status()
 {
     Console.Print("Turtle status:");
     Console.Print("Position: " + position);
     Console.Print("Orientation: " + DirectionToString(direction) + "  " + direction);
 }