private void DoSale(PetShopAnimalViewModel toSell) { Stock.Remove(toSell); Sales = Sales + 1; Revenue = Revenue + toSell.Price; BankBalance = BankBalance + toSell.Price; }
private void DoBuyAnimal(Animal animal, int cost) { var newStock = new PetShopAnimalViewModel(); newStock.Animal = animal; newStock.Price = _pricingModel.CalculateInitialSalesPrice(cost); newStock.SellCommand = new MvxCommand(() => DoSale(newStock)); BankBalance = BankBalance - cost; Stock.Add(newStock); }