Ejemplo n.º 1
0
        /// <summary>
        /// The function which will move vehicle. From this function vehicle coordinates changes.
        /// </summary>
        /// <param name="vehicle">The vehicle which will move</param>
        /// <param name="plateau">The area which vehicle will move on.</param>
        public static void MoveVehicle(IVehicle vehicle, Plateau plateau)
        {
            Plateau directionToMove = GetDirectionToMove(vehicle);

            CheckForBoundaries(vehicle.CurrentCoordinates(), directionToMove, plateau);

            vehicle.Move(directionToMove);
        }
Ejemplo n.º 2
0
 public void TestMethodoryMethodTest()
 {
     IVehicle vehicle     = VehicleFactory.MakeVehicle(robotic);
     var      coordinates = vehicle.CurrentCoordinates();
     var      directoin   = vehicle.CurrentDirection();
 }