public class MovesRobPlayerCommand extends MovesCommand
Modifier and Type | Field and Description |
---|---|
private Coordinate |
point |
private ServerGameManager |
sgm |
private int |
victimIndex |
playerIndex
gameID, playerID
Constructor and Description |
---|
MovesRobPlayerCommand(NetworkCookie cookie,
int playerIndex,
int victimIndex,
Coordinate point)
Creates a command class that robs a player.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Execute()
Executes a command
|
java.lang.String |
GetHeader()
Gets the new server header associated with the request.
|
java.lang.String |
GetResponse()
Gets the response for the server.
|
boolean |
Unexecute()
Unexecutes a command.
|
private int victimIndex
private Coordinate point
private ServerGameManager sgm
public MovesRobPlayerCommand(NetworkCookie cookie, int playerIndex, int victimIndex, Coordinate point)
playerID
- The player ID.playerIndex
- The index of the player.victimIndex
- The index of the victim.point
- The hex coordinate to place the robber.public boolean Execute()
ICommand
public boolean Unexecute()
ICommand
public java.lang.String GetResponse()
ICommand
public java.lang.String GetHeader()
ICommand