Exemple #1
0
        public void Rectangular_WhenCorrectInput_Success()
        {
            var rc = new RectangularManager();

            rc.Rectangular("5 5");
            rc.Rectangular("3 3");
        }
Exemple #2
0
        public void Rectangular_WhenValuesUnderZero_Error()
        {
            var rc = new RectangularManager();

            rc.Rectangular("-1 -1");
            rc.Rectangular("-3 3");
            rc.Rectangular("8 -8");
        }
Exemple #3
0
        public void Rectangular_WhenLengthDifferent2_Error()
        {
            var rc = new RectangularManager();

            rc.Rectangular("3");
            rc.Rectangular("f");
            rc.Rectangular("5 5 5");
        }
Exemple #4
0
        static void Main(string[] args)
        {
            var rectangularManager = new RectangularManager();
            var roverManager       = new RoverManager();
            var movesManager       = new MovesManager();

            string rectangular = Console.ReadLine();
            var    rec         = rectangularManager.Rectangular(rectangular);


            string rover = Console.ReadLine();
            var    rov   = roverManager.Rover(rover, rectangular);

            string moves = Console.ReadLine();

            movesManager.Moves(moves, rov);

            string rover2 = Console.ReadLine();
            var    rov2   = roverManager.Rover(rover2, rectangular);

            string moves2 = Console.ReadLine();

            movesManager.Moves(moves2, rov2);

            Console.WriteLine(rov.X + " " + rov.Y + " " + rov.Direction);
            Console.WriteLine(rov2.X + " " + rov2.Y + " " + rov2.Direction);

            Console.ReadLine();
        }