cz.cuni.pogamut.MessageObjects
Class Path
java.lang.Object
cz.cuni.pogamut.MessageObjects.MessageObject
cz.cuni.pogamut.MessageObjects.Path
- All Implemented Interfaces:
- Visible, java.io.Serializable, java.lang.Cloneable
public class Path
- extends MessageObject
- implements java.io.Serializable
Path is an object to store information from Gamebots message PATH
it contains an array of navPoints that leads to the goal point
PATHs are stored in GameMap
- See Also:
- Serialized Form
Field Summary |
java.util.ArrayList<NavPoint> |
nodes
array of nodes, if bot walks from current position through sequence of these NavPoints, it will arrive to the destination
Note, that reachable is not valid in these NavPoints |
java.lang.String |
pongID
PongID, same as pingID in GETPATH request, necessary for identification in case of multiple requests |
Constructor Summary |
Path()
|
Path(int ID,
java.lang.String UnrealID,
java.util.ArrayList<NavPoint> nodes)
|
Method Summary |
void |
diff(KnownObjects knownObjects)
Diff needs known objects to compress known NavPoints |
java.lang.String |
printPathIDAndLocations()
|
java.lang.String |
printPathIDs()
|
java.lang.String |
toString()
|
void |
update(KnownObjects knownObjects)
Update needs known objects to substitute delta-compressed NavPoints
Path is composed of full NavPoints and NavPoints with only ID
(those compressed agent already encountered, so it is not necessary to send
all information again)
so I replace compressed navs with their full version obtained from KnownObjects |
Methods inherited from class cz.cuni.pogamut.MessageObjects.MessageObject |
clone, diff, equals, getID, getType, getUnrealID, getVisibility, hasID, isVisible, setID, setType, setUnrealID, setVisible, update |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
nodes
public java.util.ArrayList<NavPoint> nodes
- array of nodes, if bot walks from current position through sequence of these NavPoints, it will arrive to the destination
Note, that reachable is not valid in these NavPoints
pongID
public java.lang.String pongID
- PongID, same as pingID in GETPATH request, necessary for identification in case of multiple requests
Path
public Path(int ID,
java.lang.String UnrealID,
java.util.ArrayList<NavPoint> nodes)
Path
public Path()
toString
public java.lang.String toString()
- Overrides:
toString
in class MessageObject
diff
public void diff(KnownObjects knownObjects)
- Diff needs known objects to compress known NavPoints
update
public void update(KnownObjects knownObjects)
- Update needs known objects to substitute delta-compressed NavPoints
Path is composed of full NavPoints and NavPoints with only ID
(those compressed agent already encountered, so it is not necessary to send
all information again)
so I replace compressed navs with their full version obtained from KnownObjects
- Parameters:
knownObjects
-
printPathIDs
public java.lang.String printPathIDs()
printPathIDAndLocations
public java.lang.String printPathIDAndLocations()