Class MenuItemChangeField

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

public class MenuItemChangeField extends MenuItem
Menu item to change the displayed field to that of another player
  • Field Details

    • view

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

    • MenuItemChangeField

      public MenuItemChangeField(ViewTUIMatch view)
      Build a new menu item
      Parameters:
      view - View handling the printed match for TUI
  • 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