public void Init(ITrafficLights lights) { if (IsRunning) { throw new InvalidOperationException("Init called while Engine Running"); } _lights = lights; IsStopRequested = false; IsInitialized = true; }
public TrafficLightController(ITrafficLights lights, ITrafficLightTimer timer) { _lights = lights; _timer = timer; }