pacworld
Class VisibleAgent

java.lang.Object
  extended by pacworld.VisibleAgent

public class VisibleAgent
extends java.lang.Object

The representation of an agent in an agent's percept. This includes the agent's id and current location.


Constructor Summary
VisibleAgent(java.lang.String id, int x, int y)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Tests if this object is equivalent to another object by comparing the id's of the agents.
 java.lang.String getId()
          Get the unique string id for the agent.
 int getX()
          Get the X location of the agent.
 int getY()
          Get the Y location of the agent.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VisibleAgent

public VisibleAgent(java.lang.String id,
                    int x,
                    int y)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Tests if this object is equivalent to another object by comparing the id's of the agents.

Overrides:
equals in class java.lang.Object

getId

public java.lang.String getId()
Get the unique string id for the agent.


getX

public int getX()
Get the X location of the agent.


getY

public int getY()
Get the Y location of the agent.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object