Module it.polimi.ingsw.am13
Class MenuItemJoinRoom
java.lang.Object
it.polimi.ingsw.am13.client.view.tui.menu.MenuItem
it.polimi.ingsw.am13.client.view.tui.menu.MenuItemJoinRoom
Menu item for joining an existing room.
If parses the input as
- Nickname (1 word)
- Color of token (red / blue / green / yellow)
- Game id of the room to join
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeCommand
(String args, NetworkHandler networkHandler) Executes the action this menu item representsMethods inherited from class it.polimi.ingsw.am13.client.view.tui.menu.MenuItem
getCommandKey, getDescription, toString
-
Constructor Details
-
MenuItemJoinRoom
public MenuItemJoinRoom()Build a new item for joining a room
-
-
Method Details
-
executeCommand
public void executeCommand(String args, NetworkHandler networkHandler) throws InvalidTUICommandException Executes the action this menu item represents- Specified by:
executeCommand
in classMenuItem
- Parameters:
args
- String of parameters for the commandnetworkHandler
- 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
-