Esempio n. 1
0
        // Application starting point
        public void Run()
        {
            //Plateau grid creation
            DividePlateauInGrid();

            //Rover 1
            //Setting initial position
            Console.WriteLine();
            Console.WriteLine("~~~~~~~~~~~~~~~ Rover 1 ~~~~~~~~~~~~~~~");
            rover1 = SetRoverPosition();

            //Getting and processing instructions
            ProcessInstructions(rover1);

            //Rover 2
            //Setting initial position
            Console.WriteLine();
            Console.WriteLine("~~~~~~~~~~~~~~~ Rover 2 ~~~~~~~~~~~~~~~");
            rover2 = SetRoverPosition();

            //Getting and processing instructions
            ProcessInstructions(rover2);

            //Results
            Console.WriteLine();
            Console.WriteLine("~~~~~~~~~~~~~~~ Final Rover Positions ~~~~~~~~~~~~~~~");
            Console.WriteLine("Rover 1: " + rover1.GetRoverPositionInStringFormat());
            Console.WriteLine("Rover 2: " + rover2.GetRoverPositionInStringFormat());
            Console.ReadLine();
        }