Exemple #1
0
        /// <summary>
        /// Adds a menu item to the appropriate lists
        /// </summary>
        /// <param name="item">The item to add</param>
        public void AddItem(IMenuItem item)
        {
            AvalibleMenuItems.Add(item);

            if (item is Entree e)
            {
                AvalibleEntrees.Add(e);
            }
            else if (item is Side s)
            {
                AvailableSides.Add(s);
            }
            else if (item is Drink d)
            {
                AvailableDrinks.Add(d);
            }
            else if (item is CretaceousCombo c)
            {
                AvailableCombos.Add(c);
            }
        }
Exemple #2
0
        /// <summary>
        /// Adds item to menu lists
        /// </summary>
        /// <param name="item">Menu item</param>
        public void Add(IMenuItem item)
        {
            AvailableMenuItems.Add(item);

            if (item is Entree)
            {
                AvailableEntrees.Add(item as Entree);
            }
            if (item is Side)
            {
                AvailableSides.Add(item as Side);
            }
            if (item is Drink)
            {
                AvailableDrinks.Add(item as Drink);
            }
            if (item is CretaceousCombo)
            {
                AvailableCombos.Add(item as CretaceousCombo);
            }
        }
Exemple #3
0
        /// <summary>
        /// creates an instance of menu
        /// </summary>
        public Menu()
        {
            AvailableMenuItem.Add(new JurassicJava());
            AvailableMenuItem.Add(new Sodasaurus());
            AvailableMenuItem.Add(new Tyrannotea());
            AvailableMenuItem.Add(new Water());

            AvailableDrinks.Add(new JurassicJava());
            AvailableDrinks.Add(new Sodasaurus());
            AvailableDrinks.Add(new Tyrannotea());
            AvailableDrinks.Add(new Water());

            AvailableMenuItem.Add(new Brontowurst());
            AvailableMenuItem.Add(new DinoNuggets());
            AvailableMenuItem.Add(new Tyrannotea());
            AvailableMenuItem.Add(new PrehistoricPBJ());
            AvailableMenuItem.Add(new PterodactylWings());
            AvailableMenuItem.Add(new SteakosaurusBurger());
            AvailableMenuItem.Add(new TRexKingBurger());
            AvailableMenuItem.Add(new VelociWrap());

            AvailableEntrees.Add(new Brontowurst());
            AvailableEntrees.Add(new DinoNuggets());
            AvailableEntrees.Add(new PrehistoricPBJ());
            AvailableEntrees.Add(new PterodactylWings());
            AvailableEntrees.Add(new SteakosaurusBurger());
            AvailableEntrees.Add(new TRexKingBurger());
            AvailableEntrees.Add(new VelociWrap());

            AvailableMenuItem.Add(new Fryceritops());
            AvailableMenuItem.Add(new MeteorMacAndCheese());
            AvailableMenuItem.Add(new MezzorellaSticks());
            AvailableMenuItem.Add(new Triceritots());

            AvailableSides.Add(new Fryceritops());
            AvailableSides.Add(new MeteorMacAndCheese());
            AvailableSides.Add(new MezzorellaSticks());
            AvailableSides.Add(new Triceritots());

            AvailableMenuItem.Add(new CretaceousCombo(new Brontowurst()));
            AvailableMenuItem.Add(new CretaceousCombo(new DinoNuggets()));
            AvailableMenuItem.Add(new CretaceousCombo(new PrehistoricPBJ()));
            AvailableMenuItem.Add(new CretaceousCombo(new PterodactylWings()));
            AvailableMenuItem.Add(new CretaceousCombo(new SteakosaurusBurger()));
            AvailableMenuItem.Add(new CretaceousCombo(new TRexKingBurger()));
            AvailableMenuItem.Add(new CretaceousCombo(new VelociWrap()));

            AvailableCombos.Add(new CretaceousCombo(new Brontowurst()));
            AvailableCombos.Add(new CretaceousCombo(new DinoNuggets()));
            AvailableCombos.Add(new CretaceousCombo(new PrehistoricPBJ()));
            AvailableCombos.Add(new CretaceousCombo(new PterodactylWings()));
            AvailableCombos.Add(new CretaceousCombo(new SteakosaurusBurger()));
            AvailableCombos.Add(new CretaceousCombo(new TRexKingBurger()));
            AvailableCombos.Add(new CretaceousCombo(new VelociWrap()));

            foreach (IOrderItem menu in AvailableMenuItem)
            {
                foreach (string i in menu.Ingredients)
                {
                    if (!PossibleIngredients.Contains(i))
                    {
                        PossibleIngredients.Add(i);
                    }
                }
            }
            PossibleIngredients.Sort();
        }