Beispiel #1
0
        public void GetLastCooardinate_Correct1()
        {
            char[] upperRigth    = { '5', '5' };
            char[] roverPosition = { '1', '2', 'N' };
            char[] moveAction    = "LMLMLMLMM".ToCharArray();
            var    tuple         = MarsRoverOperation.GetLastCooardinate(roverPosition, moveAction);

            Assert.Equal(Tuple.Create(1, 3, 'N'), tuple);
        }
Beispiel #2
0
        public void GetLastCooardinate_Correct3()
        {
            char[] upperRigth    = { '5', '5' };
            char[] roverPosition = { '3', '3', 'E' };
            char[] moveAction    = "MMRMMRMRRMLM".ToCharArray();
            var    tuple         = MarsRoverOperation.GetLastCooardinate(roverPosition, moveAction);

            Assert.Equal(Tuple.Create(5, 2, 'N'), tuple);
        }