Пример #1
0
        public CoffeeMaker()
        {
            Ingredients    = new Dictionary <System.Type, Consumable>();
            MaxIngredients = new Dictionary <System.Type, double>();

            Ingredients[typeof(Water)]       = new Water();
            Ingredients[typeof(Grains)]      = new Grains();
            Ingredients[typeof(Coffee)]      = new Coffee();
            Ingredients[typeof(PaperFilter)] = new PaperFilter();

            MaxIngredients[typeof(Water)]       = 12.0;
            MaxIngredients[typeof(Grains)]      = 1.0;
            MaxIngredients[typeof(Coffee)]      = 12.0;
            MaxIngredients[typeof(PaperFilter)] = 2.0;
        }
Пример #2
0
 public Coffee(Water w, Grains g, PaperFilter pf)
 {
     this.RoastLevel = g.RoastLevel;
     this.Caffiene   = w.Quantity / g.Quantity;
 }