|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject
edu.columbia.cs.coms4701.agent.environments.simple.SimpleAgent<RobotAction,RobotPercept>
edu.columbia.cs.coms4701.agent.environments.robot.RoombaAgent
public class RoombaAgent
This class represents a happy little RoombaVac robot.
Note that agent programs do *not* have access to the properties of the agent -- they receive only percepts.
This class is instead used by the environment to keep track of the wandering little robots, and by GUI or text observers.
Field Summary |
---|
Fields inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject |
---|
changeSupport |
Constructor Summary | |
---|---|
RoombaAgent()
|
Method Summary | |
---|---|
java.lang.Integer |
getCleanedDirtCount()
Returns how many pieces of dirt this agent has picked up. |
DiscretePoint2D |
getLocation()
Gets the location of the object in the grid. |
void |
incrementCleanedDirtCount()
Convenience method for incrementing the cleaned dirt count by 1. |
void |
setCleanedDirtCount(java.lang.Integer theCount)
Sets the count of how many pieces of dirt this agent has picked up. |
void |
setLocation(DiscretePoint2D theLocation)
Sets the location of the object in the grid. |
java.lang.String |
toString()
|
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleAgent |
---|
getAgentProgram, getAuthor, getDescription, getPerformanceMeasure, nextAction, setAgentProgram, setPerformanceMeasure |
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject |
---|
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.columbia.cs.coms4701.agent.Agent |
---|
getAgentProgram, getAuthor, getDescription, getPerformanceMeasure, nextAction, setAgentProgram, setPerformanceMeasure |
Methods inherited from interface edu.columbia.cs.coms4701.agent.EnvironmentObject |
---|
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive |
Methods inherited from interface edu.columbia.cs.coms4701.agent.EnvironmentObject |
---|
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive |
Constructor Detail |
---|
public RoombaAgent()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public DiscretePoint2D getLocation()
GridObject
getLocation
in interface GridObject
public void setLocation(DiscretePoint2D theLocation)
GridObject
It's the environment's responsibility to ensure that newly assigned locations are within the bounds established by the environment.
setLocation
in interface GridObject
theLocation
- a 2-dimensional point, assumed to be validpublic java.lang.Integer getCleanedDirtCount()
getCleanedDirtCount
in interface RobotAgent
public void setCleanedDirtCount(java.lang.Integer theCount)
setCleanedDirtCount
in interface RobotAgent
theCount
- public void incrementCleanedDirtCount()
incrementCleanedDirtCount
in interface RobotAgent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |