Class MenuItemChooseObj

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

public class MenuItemChooseObj extends MenuItem
Menu item for choosing the personal objective card during INIT game phase It expects 1 argument (which card to choose) and sends the command to the server
  • Field Details

    • state

      private final GameState state
      Reference to the current game's state
  • Constructor Details

    • MenuItemChooseObj

      public MenuItemChooseObj(GameState state)
      Build a new item for choosing the personal objective card
      Parameters:
      state - Reference to the current game's state
  • Method Details

    • executeCommand

      public void executeCommand(String argsStr, NetworkHandler networkHandler) throws InvalidTUICommandException
      Executes the action this menu item represents
      Specified by:
      executeCommand in class MenuItem
      Parameters:
      argsStr - String of parameters for the command
      networkHandler - Handler of the network thanks to which the item sends the command to the server
      Throws:
      InvalidTUICommandException - If the arguments passed via command line are wrong, or anyway different from what expected