Class MenuItemEnterChat

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

public class MenuItemEnterChat extends MenuItem
Menu item for entering a chat room It expects 1 argument
  • Player's nickname associated to the chat room, or 'all' for the global chatroom with all the players
And then it sends the command to the server
  • Field Details

    • view

      private final ViewTUI view
      View handling the printed match for TUI
  • Constructor Details

    • MenuItemEnterChat

      public MenuItemEnterChat(ViewTUI view)
      Build a new menu item
  • 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