示例#1
0
文件: Program.cs 项目: Neda64/Robot
        static void Main(string[] args)
        {
            try
            {
                Robot robot = new Robot(150, 150);

                robot.PLACE(0, 0, Direction.NORTH);
                robot.MOVE();
                robot.REPORT();

                robot.PLACE(0, 0, Direction.NORTH);
                robot.LEFT();
                robot.REPORT();

                robot.PLACE(1, 2, Direction.EAST);
                robot.MOVE();
                robot.MOVE();
                robot.LEFT();
                robot.MOVE();
                robot.REPORT();
            }
            catch (Exception e)
            {
                Console.WriteLine("{0} Exception caught.", e);
            }

            Console.ReadKey();
        }