public class MovesRoadBuildingCommand extends MovesCommand
| Modifier and Type | Field and Description |
|---|---|
private Coordinate |
end1 |
private Coordinate |
end2 |
private GameModel |
gm |
private Coordinate |
start1 |
private Coordinate |
start2 |
playerIndexgameID, playerID| Constructor and Description |
|---|
MovesRoadBuildingCommand(NetworkCookie cookie,
int playerIndex,
Coordinate start1,
Coordinate end1,
Coordinate start2,
Coordinate end2)
Creates a command object for building roads.
|
| 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 start1
private Coordinate end1
private Coordinate start2
private Coordinate end2
private GameModel gm
public MovesRoadBuildingCommand(NetworkCookie cookie, int playerIndex, Coordinate start1, Coordinate end1, Coordinate start2, Coordinate end2)
playerID - The player ID.playerIndex - The player index.start1 - The start of the first road.end1 - The end of the first road.start2 - The start of the second road.end2 - The end of the second road.public boolean Execute()
ICommandpublic boolean Unexecute()
ICommandpublic java.lang.String GetResponse()
ICommandpublic java.lang.String GetHeader()
ICommand