public override TransportState Process(Transport transport) { if (transport.CanFinishUnloading()) { transport.FinishUnloading(); transport.ReturnToOrigin(); return(Returning); } return(this); }
public override TransportState Process(Transport transport) { if (transport.IsAtDestination()) { transport.ArriveAtRouteDestination(); transport.StartUnloading(); if (transport.CanFinishUnloading()) { transport.FinishUnloading(); transport.ReturnToOrigin(); return(Returning); } else { return(Unloading); } } return(this); }