public bool IsAffordable(ItemDatum itemDatum, int amount) { if (goldAmount < itemDatum.GetPrice() * amount) { return(false); } else { return(true); } }
public bool TryToBuyEquipmentItem(ItemDatum itemDatum) { if (IsInventoryFull()) { return(false); } else { goldAmount -= itemDatum.GetPrice(); AddItem(itemDatum); return(true); } }
public int GetPrice() { return(itemDatum.GetPrice()); }