|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Position | +--AgentPosition
This class will be used to communicate the position
of an Agent between your player classes and our
game program. Modified so that it extends Position
Field Summary |
Fields inherited from class Position |
x, y |
Constructor Summary | |
AgentPosition(int id,
int x,
int y)
Creates a new AgentPosition instance. |
Method Summary | |
int |
getID()
This method gets the id of the Agent. |
java.lang.String |
toString()
|
Methods inherited from class Position |
getXPos, getYPos |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AgentPosition(int id, int x, int y)
AgentPosition
instance.
id
- is the id number of the Agent.x
- is the position of the Agnet on the x coordinatey
- is the position of the Agent in the y coordinateMethod Detail |
public int getID()
AgentPosition
instance for the
Agent whose position you wish to communicate
int
valuepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |