public class MovesAcceptTradeCommand extends MovesCommand
Modifier and Type | Field and Description |
---|---|
private ServerGameManager |
sgm |
private boolean |
willAccept |
playerIndex
gameID, playerID
Constructor and Description |
---|
MovesAcceptTradeCommand(NetworkCookie cookie,
int playerIndex,
boolean willAccept)
Creates a command to accept the trade.
|
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 ServerGameManager sgm
private boolean willAccept
public MovesAcceptTradeCommand(NetworkCookie cookie, int playerIndex, boolean willAccept)
cookie
- The ID of the player who is accepting/game IDplayerIndex
- The index of the player who is accepting.willAccept
- True if they accept, else false.public boolean Execute()
ICommand
public boolean Unexecute()
ICommand
public java.lang.String GetResponse()
ICommand
public java.lang.String GetHeader()
ICommand