edu.columbia.cs.coms4701.agent.environments.grid
Interface GridObject

All Superinterfaces:
EnvironmentObject
All Known Subinterfaces:
GridObstacle, RobotAgent
All Known Implementing Classes:
RoombaAgent, RoombaDirt, SimpleGridObject, SimpleGridObstacle, Stone

public interface GridObject
extends EnvironmentObject

Interface for an environment object that has a location on a 2-dimensional grid.

Version:
0.1

User: aaron Date: Aug 25, 2006 Time: 2:20:56 PM

Author:
aaron@cs

Method Summary
 DiscretePoint2D getLocation()
          Gets the location of the object in the grid.
 void setLocation(DiscretePoint2D theLocation)
          Sets the location of the object in the grid.
 
Methods inherited from interface edu.columbia.cs.coms4701.agent.EnvironmentObject
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive
 

Method Detail

getLocation

DiscretePoint2D getLocation()
Gets the location of the object in the grid.

Returns:
the coordinates in the grid

setLocation

void setLocation(DiscretePoint2D theLocation)
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.

Parameters:
theLocation - a 2-dimensional point, assumed to be valid