public void PutInTheSmartFortwo(CrewMember driver, CrewMember passenger, Place currentPlace, Place destinyPlace) { if (!CurrentPlaceHasSmartFortwo(currentPlace)) { throw new Exception("The smart fortwo was not found!"); } if (!driver.IsNull()) { if (!DriverHasAuthorization(driver)) { throw new Exception($"{driver.Name} is not authorized to drive this vehicle"); } } currentPlace.Remove(driver, passenger); var shouldPutBoth = !passenger.IsNull() && !driver.IsNull(); var shouldPutOnlyDriver = !driver.IsNull() && passenger.IsNull(); var shouldPutOnlyPassenger = !passenger.IsNull() && driver.IsNull(); if (!shouldPutBoth && !shouldPutOnlyDriver && !shouldPutOnlyPassenger) { return; } else if (shouldPutOnlyDriver) { currentPlace.PutDriverInSmartFortwo(driver); } else if (shouldPutOnlyPassenger) { currentPlace.PutPassengerInSmartFortwo(passenger); } else { currentPlace.PutBothInSmartFortwo(driver, passenger); } _tripInformerService.ShowBoardingInfo(driver, passenger); _tripInformerService.ShowTripStateInfo(currentPlace, destinyPlace); }