/// <summary> /// Constructor /// </summary> /// <param name="idGenerator">A generator to create ids to sorting lines</param> /// <param name="configuration">A configuration object</param> /// <param name="lines">The character representation of all sorting lines</param> public Yard(IIdGenerator idGenerator, IConfiguration configuration, IEnumerable <IEnumerable <char> > lines) { IdGenerator = idGenerator; Configuration = configuration; SortingLines = CreateSortingLines(lines); YardLocomotive = new YardLocomotive(Configuration); Yardmaster = new Yardmaster(YardLocomotive); TrainLine = new TrainLine(); }
/// <summary> /// Constructor /// </summary> /// <param name="idGenerator">A generator to create ids to sorting lines</param> /// <param name="configuration">A configuration object</param> /// <param name="lines">The character representation of all sorting lines</param> public Yard(IIdGenerator idGenerator, IConfiguration configuration, IEnumerable<IEnumerable<char>> lines) { IdGenerator = idGenerator; Configuration = configuration; SortingLines = CreateSortingLines(lines); YardLocomotive = new YardLocomotive(Configuration); Yardmaster = new Yardmaster(YardLocomotive); TrainLine = new TrainLine(); }