public void AddDrink(Drink drink) { var drinkCode = DrinkDictionary.GetCode(drink.GetType()); _DrinkCounter[drinkCode] += 1; _TotalMoney += drink.Price(); }
private static bool IsDrinkCommand(string commandToParse) { var drinkCommandCodes = DrinkDictionary.PossibleDrinks(); return(drinkCommandCodes.Any(commandToParse.StartsWith)); }