/// <summary> /// Constructs a new instance of the TrackController class /// </summary> /// <param name="env">A reference to the global environment object</param> /// <param name="circuit">A track circuit for the track controller</param> public TrackController(ISimulationEnvironment env, ITrackCircuit circuit) { _trains = new Dictionary<int, ITrainModel>(); _blocks = new Dictionary<int, IBlock>(); _routes = new Dictionary<int, List<IBlock>>(); _updateBlocks = new Dictionary<int, IBlock>(); _env = env; _env.Tick += EnvTick; ID = -1; SetId(); _circuit = circuit; _circuit.ID = ID; // PROTOTYPE - static PLC _plc = new Plc(_env, _circuit); _messages = new List<string>(); }