Exemplo n.º 1
0
        private void ApplyMove(Plateau plateau)
        {
            int nextX;
            int nextY;

            if (RoverUtils.IsMoveDirectiveAvailable(plateau, this, out nextX, out nextY))
            {
                X = nextX;
                Y = nextY;
            }
        }
Exemplo n.º 2
0
        public void IsMoveDirectiveAvailable_ShouldBeFalseWhenNextStepInPlatoDimention(int plateauX, int plateauY, int roverX, int roverY, char compass)
        {
            //Arrange
            var plateau = new Plateau(plateauX, plateauY);
            var rover   = new Rover(roverX, roverY, compass);
            int nextX;
            int nextY;


            //Act
            var act = RoverUtils.IsMoveDirectiveAvailable(plateau, rover, out nextX, out nextY);

            // Assert
            Assert.False(act);
        }