示例#1
0
 public void JustGiveSomeBeer()
 {
     if (containers.Count != 0)
     {
         Container justBeer = containers[0];
         MachineWashContainer.WashContainer(justBeer);
         FillContainer.WithAlcohol(new Beer(beerGradus), justBeer);
         Console.WriteLine("Take a fast cold beer :)");
         containers.RemoveAt(0);
     }
     else
     {
         Console.WriteLine("There are no any beer :(");
     }
 }
示例#2
0
        public void DrinkBottleBeer()
        {
            Container glass = containers.FirstOrDefault(cont => cont.Type == ContainerType.Glass);

            if (glass == null)
            {
                Console.WriteLine("There are no beer bottles");
                return;
            }

            MachineWashContainer.WashContainer(glass);
            FillContainer.WithAlcohol(new Beer(beerGradus), glass);

            Console.WriteLine("Cheers! Here you are you beer;");
            containers.Remove(glass);
        }
示例#3
0
        public void DrinkGetBigBeer()
        {
            Container bigContainer = containers.FirstOrDefault(cont => cont.Type == ContainerType.Keg);

            if (bigContainer == null)
            {
                Console.WriteLine("Big beers is empty");
                return;
            }

            MachineWashContainer.WashContainer(bigContainer);
            FillContainer.WithAlcohol(new Beer(beerGradus), bigContainer);

            Console.WriteLine("You just got a keg of beer! Nice one!");
            containers.Remove(bigContainer);
        }