예제 #1
0
        private void DisplayLoadingSequence(List <CoalMovement> coalToBin)
        {
            Console.WriteLine();
            Console.WriteLine("======================================");
            Console.WriteLine();
            Console.WriteLine("The following coal movements are to be dumped");
            Console.WriteLine("in the following order: ");
            Console.WriteLine();

            CoalMovement ROMTruck = coalToBin[coalToBin.Count - 1];

            coalToBin.Remove(ROMTruck);

            foreach (CoalMovement movement in coalToBin)
            {
                Console.WriteLine(movement.Truck + " arrives at " + movement.PropDateTime.ToString() + " carrying " +
                                  movement.Coal);
            }

            //TODO: needs to identify the stockpile to take from.
            Console.WriteLine("ROM loader is to load " + ROMTruck.Coal);

            Console.WriteLine();
            Console.WriteLine("======================================");
        }
예제 #2
0
        /// <summary>
        /// Returns a new coal movement with the ROM truck labeled as the truck.
        /// </summary>
        /// <param name="requiredCoal">The coal in the the coal movement.</param>
        /// <param name="time">ETA of the rom truck to be loaded.</param>
        /// <returns></returns>
        private CoalMovement LoadROMTruck(string requiredCoal, DateTime time)
        {
            CoalMovement romMovement = new CoalMovement(requiredCoal, "ROM Truck", time);

            return(romMovement);
        }