java.lang.Object
it.polimi.ingsw.am13.client.view.tui.menu.MenuTUI

public class MenuTUI extends Object
Menu storing all possible menu items corresponding to the is possible executable action in the current state of the game.
  • Field Details

    • request

      private final String request
      Request to be printed before the menu
  • Constructor Details

    • MenuTUI

      public MenuTUI(String request, MenuItem... menuItems)
      Builds a new given the list of MenuItem which the menu is composed of.
      Parameters:
      menuItems - list of MenuItem instances
  • Method Details

    • printMenu

      public void printMenu()
      Prints (text) the menu
    • getItem

      public MenuItem getItem(String commandKey)
      Parameters:
      commandKey - Command key of the menu item
      Returns:
      The menu item corresponding to the given command key, or null if there is no item with that command key