public void MakeSelection(VendingSelection selection) { if (_moneyBox.TryDebitBalalnce(selection)) { TakeOutTray.Add(selection.CreateItem()); } }
public bool TryDebitBalalnce(VendingSelection selection) { if (_currentBalance < selection.Price) { return(false); } _currentBalance -= selection.Price; return(true); }