示例#1
0
        public void AddDrink(Drink drink)
        {
            var drinkCode = DrinkDictionary.GetCode(drink.GetType());

            _DrinkCounter[drinkCode] += 1;

            _TotalMoney += drink.Price();
        }
示例#2
0
        private static bool IsDrinkCommand(string commandToParse)
        {
            var drinkCommandCodes = DrinkDictionary.PossibleDrinks();

            return(drinkCommandCodes.Any(commandToParse.StartsWith));
        }