Beispiel #1
0
        static void Main(string[] args)
        {
            do
            {
                var combinedCoordinates = GetEnteredCoordinates();
                var plato    = new Plato();
                var rover    = new Rover(combinedCoordinates, plato);
                var commands = GetEnteredCommands();
                rover.Run(commands);

                Console.WriteLine($"The rover's current coordinates: {rover.X} {rover.Y} {rover.Direction.GetShortCode()}");

                Console.WriteLine("Do you want to continue? (y/n)");
                var isContinue = Console.ReadLine();
                if (isContinue.ToLower() != "y")
                {
                    break;
                }
            } while (true);
        }