edu.columbia.cs.coms4701.agent.environments.robot
Class RoombaAgent

java.lang.Object
  extended by edu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject
      extended by edu.columbia.cs.coms4701.agent.environments.simple.SimpleAgent<RobotAction,RobotPercept>
          extended by edu.columbia.cs.coms4701.agent.environments.robot.RoombaAgent
All Implemented Interfaces:
Agent<RobotAction,RobotPercept>, EnvironmentObject, GridObject, RobotAgent

public class RoombaAgent
extends SimpleAgent<RobotAction,RobotPercept>
implements RobotAgent

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.

Version:
0.1

User: aaron Date: Aug 25, 2006 Time: 1:39:52 PM

Author:
aaron@cs

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

RoombaAgent

public RoombaAgent()
Method Detail

toString

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

getLocation

public DiscretePoint2D getLocation()
Description copied from interface: GridObject
Gets the location of the object in the grid.

Specified by:
getLocation in interface GridObject
Returns:
the coordinates in the grid

setLocation

public void setLocation(DiscretePoint2D theLocation)
Description copied from interface: GridObject
Sets the location of the object in the grid.

It's the environment's responsibility to ensure that newly assigned locations are within the bounds established by the environment.

Specified by:
setLocation in interface GridObject
Parameters:
theLocation - a 2-dimensional point, assumed to be valid

getCleanedDirtCount

public java.lang.Integer getCleanedDirtCount()
Returns how many pieces of dirt this agent has picked up.

Specified by:
getCleanedDirtCount in interface RobotAgent
Returns:
an integer between 0 and the area of the grid

setCleanedDirtCount

public void setCleanedDirtCount(java.lang.Integer theCount)
Sets the count of how many pieces of dirt this agent has picked up.

Specified by:
setCleanedDirtCount in interface RobotAgent
Parameters:
theCount -

incrementCleanedDirtCount

public void incrementCleanedDirtCount()
Convenience method for incrementing the cleaned dirt count by 1.

Specified by:
incrementCleanedDirtCount in interface RobotAgent