Example #1
0
        public Train(string name, Carriage headCarriage, Carriage[] carriages = null)
        {
            Name = name;

            this.carriages.Add(headCarriage);
            if (carriages != null)
            {
                this.carriages.AddRange(carriages);
            }
        }
Example #2
0
 public void AddCarriage(Carriage carriage)
 {
     this.carriages.Add(carriage);
 }