public class MovesDiscardCardsCommand extends MovesCommand
Modifier and Type | Field and Description |
---|---|
private ServerGameManager |
sgm |
private java.util.List<java.lang.Integer> |
toDiscard |
playerIndex
gameID, playerID
Constructor and Description |
---|
MovesDiscardCardsCommand(NetworkCookie cookie,
int playerIndex,
java.util.List<java.lang.Integer> toDiscard)
Creates a command that handles discarding.
|
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 java.util.List<java.lang.Integer> toDiscard
public MovesDiscardCardsCommand(NetworkCookie cookie, int playerIndex, java.util.List<java.lang.Integer> toDiscard)
cookie
- The player ID/game IDplayerIndex
- The player index.toDiscard
- The quantity of cards to discard (brick, ore, sheep, wheat, wood).public boolean Execute()
ICommand
public boolean Unexecute()
ICommand
public java.lang.String GetResponse()
ICommand
public java.lang.String GetHeader()
ICommand