public class MovesBuildRoadCommand extends MovesCommand
| Modifier and Type | Field and Description |
|---|---|
private Coordinate |
end |
private boolean |
free |
private GameModel |
gm |
private Coordinate |
start |
playerIndexgameID, playerID| Constructor and Description |
|---|
MovesBuildRoadCommand(NetworkCookie cookie,
int playerIndex,
Coordinate start,
Coordinate end,
boolean free)
Creates a command object that builds a road.
|
| 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 Coordinate start
private Coordinate end
private boolean free
private GameModel gm
public MovesBuildRoadCommand(NetworkCookie cookie, int playerIndex, Coordinate start, Coordinate end, boolean free)
playerID - The player ID.playerIndex - The player index.start - The start of the road.end - The end of the road.free - True if free, else false. (Free for setup).public boolean Execute()
ICommandpublic boolean Unexecute()
ICommandpublic java.lang.String GetResponse()
ICommandpublic java.lang.String GetHeader()
ICommand