Exemple #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;
        }
Exemple #2
0
 private void SelectMold(Toy toy)
 {
     Console.WriteLine("Selecting mold {0}", toy.GetType().Name);
 }