Class InventoryController
java.lang.Object
com.mg105.interface_adapters.inventory.InventoryController
A class that serves the UI and allows users to make the desired changes to the Inventory
-
Constructor Summary
ConstructorDescriptionInventoryController
(@NotNull InventoryInteractor interactor) Creates a new instance of inventory controller -
Method Summary
Modifier and TypeMethodDescriptionvoid
Makes a call that will send the necessary details to the Inventory ui about the inventory.void
removeItem
(@NotNull String itemName) Attempts to the remove the item from the inventory.void
Attempts to use an item in the inventory on the specified character Item should exist in the inventory before calling this.
-
Constructor Details
-
InventoryController
Creates a new instance of inventory controller- Parameters:
interactor
- an object that interacts directly with the inventory
-
-
Method Details
-
removeItem
Attempts to the remove the item from the inventory. Item should exist in the inventory before calling this.- Parameters:
itemName
- the item to remove from the inventory- See Also:
-
useItem
Attempts to use an item in the inventory on the specified character Item should exist in the inventory before calling this.- Parameters:
itemName
- the item to usecharacterName
- the character to use the item on- See Also:
-
getInventoryDetails
public void getInventoryDetails()Makes a call that will send the necessary details to the Inventory ui about the inventory.- See Also:
-