Example #1
0
        public static void Main(string[] args)
        {
            var textInputter     = new TextInputter();
            var textOutputter    = new TextOutputter();
            var toyRobotAssembly = new ToyRobotAssembly(textInputter, textOutputter);
            var driver           = toyRobotAssembly.ToyRobotDriver;

            driver.Run();
        }
Example #2
0
        public static void Main(string[] args)
        {
            var textInputter  = new TextInputter();
            var textOutputter = new TextOutputter();
            int numRobots;

            if (!int.TryParse(args[0], out numRobots))
            {
                return;
            }
            var toyRobotAssembly = new ToyRobotAssembly(textInputter, textOutputter, numRobots);
            var driver           = toyRobotAssembly.ToyRobotDriver;

            driver.Run();
        }
Example #3
0
        public static void Main(string[] args)
        {
            var textInputter  = new TextInputter();
            var textOutputter = new TextOutputter();
            int xCoordinate;

            if (!int.TryParse(args[0], out xCoordinate))
            {
                return;
            }
            int yCoordinate;

            if (!int.TryParse(args[1], out yCoordinate))
            {
                return;
            }
            var tableDimensions  = new TableDimensions(xCoordinate, yCoordinate);
            var toyRobotAssembly = new ToyRobotAssembly(textInputter, textOutputter, tableDimensions);
            var driver           = toyRobotAssembly.ToyRobotDriver;

            driver.Run();
        }