Beispiel #1
0
        /// <summary>
        /// Make a new toy.
        /// </summary>
        public void MakeToy()
        {
            ConsoleColor current = Console.ForegroundColor;
            Toy          toy     = CreateToy();

            Console.ForegroundColor = toy.GetColor();
            int grams = toy.GetPowderQuantity();

            PreparePowder(grams);
            SelectMold(toy);
            InjectPowder(grams);
            TimeSpan heatingTime = toy.GetHeatingTime();

            HeatMold(heatingTime);
            ExtractToy();
            ConsoleColor color = toy.GetColor();

            PaintToy(color);
            Console.ForegroundColor = current;
        }
Beispiel #2
0
 private void SelectMold(Toy toy)
 {
     Console.WriteLine("Selecting mold {0}", toy.GetType().Name);
 }