Class InventoryController

java.lang.Object
com.mg105.interface_adapters.inventory.InventoryController

public class InventoryController extends Object
A class that serves the UI and allows users to make the desired changes to the Inventory
  • Constructor Details

    • InventoryController

      public InventoryController(@NotNull @NotNull InventoryInteractor interactor)
      Creates a new instance of inventory controller
      Parameters:
      interactor - an object that interacts directly with the inventory
  • Method Details

    • removeItem

      public void removeItem(@NotNull @NotNull String itemName)
      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

      public void useItem(@NotNull @NotNull String itemName, @NotNull @NotNull String characterName)
      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 use
      characterName - 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: