예제 #1
0
 public void ChangeDriver(Driver newDriver)
 {
     if (!newDriver.Equals(_currentDriver))
     {
         _currentDriver = newDriver;
     }
 }
예제 #2
0
        public static void Main(string[] args)
        {
            var car = F1Car.GetDefaultCar();

            var schumacher = new Driver("Michael Schumacher" );
            car.ChangeDriver(schumacher);

//            car.StartEngine();
            var started = car.TryStartEngine();

            var toroRossoCar = new F1Car("Toro Rosso");
            var verstappen = new Driver("Max Emilian Verstappen");
            verstappen.SetCar(toroRossoCar);
        }