void Buy(IItem item) { if (Gold < item.Price) { throw new Exception("Not enough gold to buy this item"); } Gold -= item.Price; item.AddToInventory(this); }