예제 #1
0
파일: UnitTest1.cs 프로젝트: erkmena/Mars45
 public void GetDirectionToMoveTest()
 {
     for (int i = 0; i < 4; i++) //One iteration for each side
     {
         Plateau plateau = VehicleHelper.GetDirectionToMove(robotic);
         VehicleHelper.TurnVehicle(robotic, 'L');
     }
 }
예제 #2
0
파일: UnitTest1.cs 프로젝트: erkmena/Mars45
        public void CheckForBoundaries()
        {
            RoboticRover roboticNew = new RoboticRover('N', new Plateau(5, 5)
            {
                XAxis = 1, YAxis = 1
            });
            Plateau plateau = VehicleHelper.GetDirectionToMove(robotic);

            for (int i = 0; i < 4; i++)//One iteration for each side
            {
                VehicleHelper.CheckForBoundaries(roboticNew.CurrentCoordinates(), plateau, originalPlateau);
                plateau = TurnAndGetDirection(robotic);
            }
        }
예제 #3
0
파일: UnitTest1.cs 프로젝트: erkmena/Mars45
 public Plateau TurnAndGetDirection(IVehicle vehicle)
 {
     VehicleHelper.TurnVehicle(robotic, 'L');
     return(VehicleHelper.GetDirectionToMove(robotic));
 }