コード例 #1
0
        public void StartBrewing(int strength, int amountToBrew, ILiquidDispencer liquidDispencer, IBeanDispencer beanDispencer)
        {
            // Heat up...
            Heater.HeatUp();

            // Calculate amount of beans to use...
            int beansToUse = Calculator.CalculateSpoonsOfBeansToUse(strength);

            // Get the liquid from dispencer...
            liquidDispencer.FillBrewer(amountToBrew);

            // Get beans from dispencer...
            beanDispencer.FillBrewer(beansToUse);

            // Brew the choosen type...
            Brew(amountToBrew, beanDispencer);

            // Cool down the heater again...
            Heater.CoolDown();
        }
コード例 #2
0
 private void Filldispencers(ILiquidDispencer liquidDispencer, IBeanDispencer beanDispencer)
 {
     liquidDispencer.FillDispencer();
     beanDispencer.FillDispencer();
 }