Class StationServingComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.station.StationServingComponent

public class StationServingComponent extends Component
StationServingComponent.java StationServingComponent gives the station the ability to submit a meal to be able to be served to a customer. This will specifically be used by the serving bench 'station'. submitMeal(ItemComponent): Function which controls the submission of a meal by the class. This component is currently incomplete and will need to be finished.
  • Constructor Details

    • StationServingComponent

      public StationServingComponent()
  • Method Details

    • create

      public void create()
      On creation a listener for Submit Meal will be added to the station.
      Overrides:
      create in class Component
    • canSubmitMeal

      public boolean canSubmitMeal(ItemComponent item)
    • handleInteraction

      public void handleInteraction(InventoryComponent playerInventoryComponent, InventoryDisplay inventoryDisplay, String type)
      Handles any interaction with station, using current state of player and station inventory to determine intended interaction
      Parameters:
      playerInventoryComponent - reference to player inventory component
      inventoryDisplay - reference to individual inventory display
      type - the type of interaction attempt
    • checkSubmit

      public Boolean checkSubmit(ItemComponent item)
    • submitMeal

      public void submitMeal(ItemComponent item)
      Function which calls to identify the current ticket info, as well as the item in the inventory Calls another function which grades the submission
      Parameters:
      item - reference to the item being submitted by the user
    • setGoldMultiplier

      public void setGoldMultiplier(int multiplier)
      Sets the gold multiplier
      Parameters:
      multiplier - the multiplier desired