protected override Item CreateItem(string itemTypeString, string itemNameString, Location itemLocation, Item item) { switch (itemTypeString) { case "weapon": return new Weapon(itemNameString, itemLocation); case "wood": return new Wood(itemNameString, itemLocation); case "iron": return new Iron(itemNameString, itemLocation); default: return base.CreateItem(itemTypeString, itemNameString, itemLocation, item); } }
public void RemoveFromInventory(Item item) { this.inventoryItems.Remove(item); }
public void AddToInventory(Item item) { this.inventoryItems.Add(item); }