ExecuteCommand() публичный Метод

public ExecuteCommand ( string command ) : void
command string
Результат void
Пример #1
0
        static void Main(string[] args)
        {
            Engine engine = GetEngineInstance();

            string command = Console.ReadLine();

            while (command != "end")
            {
                engine.ExecuteCommand(command);
                command = Console.ReadLine();
            }
        }
Пример #2
0
        public static void Main()
        {
            Engine engine = GetEngineInstance();

            string command = Console.ReadLine();

            while (command != "end")
            {
                engine.ExecuteCommand(command);
                command = Console.ReadLine();
            }
            Console.WriteLine(Engine.result.ToString().TrimEnd());
        }
Пример #3
0
        static void Main(string[] args)
        {
            using (var sw = new StreamWriter("../../test.out.txt"))
            {
                Console.SetOut(sw);

                Engine engine = GetEngineInstance();

                string command = Console.ReadLine();
                while (command != "end")
                {
                    engine.ExecuteCommand(command);
                    command = Console.ReadLine();
                }
            }
        }
Пример #4
0
        static void Main(string[] args)
        {
            Ninja    n = new Ninja("dsa", new Point(3, 4), 2);
            IFighter t = n as IFighter;

            t.HitPoints -= 100;
            Console.WriteLine(t.HitPoints);

            Engine engine = GetEngineInstance();

            string command = Console.ReadLine();

            while (command != "end")
            {
                engine.ExecuteCommand(command);
                command = Console.ReadLine();
            }
        }