public class AKMove extends AbstractCommand
Constructor and Description |
---|
AKMove(EntityID agent,
int time,
java.util.List<EntityID> path)
Construct a move command.
|
AKMove(EntityID agent,
int time,
java.util.List<EntityID> path,
int destinationX,
int destinationY)
Construct a move command.
|
AKMove(java.io.InputStream in)
An AKMove message that populates its data from a stream.
|
Modifier and Type | Method and Description |
---|---|
int |
getDestinationX()
Get the destination X coordinate.
|
int |
getDestinationY()
Get the destination Y coordinate.
|
java.util.List<EntityID> |
getPath()
Get the desired movement path.
|
getAgentID, getTime, setAgentID, setTime
addMessageComponent, getComponents, getURN, read, toString, write
public AKMove(java.io.InputStream in) throws java.io.IOException
in
- The InputStream to read.java.io.IOException
- If there is a problem reading the stream.public AKMove(EntityID agent, int time, java.util.List<EntityID> path)
time
- The time the command was issued.agent
- The ID of the agent issuing the command.path
- The path to move.public AKMove(EntityID agent, int time, java.util.List<EntityID> path, int destinationX, int destinationY)
time
- The time the command was issued.agent
- The ID of the agent issuing the command.path
- The path to move.destinationX
- The X coordinate of the desired destination.destinationY
- The Y coordinate of the desired destination.public java.util.List<EntityID> getPath()
public int getDestinationX()
public int getDestinationY()