public IItem SellItem(IItem item) { // Remove item from the stock if (item.Amount - 1 == 0) { RemoveItem(item); // remove item if amount will equal 0 } else { item.UpdateAmount(-1); // reduce amount if it won't } // Return item IItem soldItem = item.DeepClone(); soldItem.Amount = 1; return(soldItem); }