public class XYEnvironment extends AbstractEnvironment
agents, envObjects, performanceMeasures, views
Constructor and Description |
---|
XYEnvironment(int width,
int height) |
Modifier and Type | Method and Description |
---|---|
void |
addObjectToLocation(EnvironmentObject eo,
XYLocation loc) |
void |
executeAction(Agent a,
Action action)
Does nothing (don't ask me why...).
|
XYLocation |
getCurrentLocationFor(EnvironmentObject eo) |
java.util.Set<EnvironmentObject> |
getObjectsAt(XYLocation loc) |
java.util.Set<EnvironmentObject> |
getObjectsNear(Agent agent,
int radius) |
Percept |
getPerceptSeenBy(Agent anAgent) |
boolean |
isBlocked(XYLocation loc) |
void |
makePerimeter() |
void |
moveObject(EnvironmentObject eo,
XYLocation.Direction direction) |
void |
moveObjectToAbsoluteLocation(EnvironmentObject eo,
XYLocation loc) |
addAgent, addEnvironmentObject, addEnvironmentView, createExogenousChange, getAgents, getEnvironmentObjects, getPerformanceMeasure, isDone, notifyEnvironmentViews, notifyEnvironmentViews, notifyViews, removeAgent, removeEnvironmentObject, removeEnvironmentView, step, step, stepUntilDone, updatePerformanceMeasure
public void executeAction(Agent a, Action action)
executeAction
in class AbstractEnvironment
public Percept getPerceptSeenBy(Agent anAgent)
getPerceptSeenBy
in class AbstractEnvironment
public void addObjectToLocation(EnvironmentObject eo, XYLocation loc)
public void moveObjectToAbsoluteLocation(EnvironmentObject eo, XYLocation loc)
public void moveObject(EnvironmentObject eo, XYLocation.Direction direction)
public XYLocation getCurrentLocationFor(EnvironmentObject eo)
public java.util.Set<EnvironmentObject> getObjectsAt(XYLocation loc)
public java.util.Set<EnvironmentObject> getObjectsNear(Agent agent, int radius)
public boolean isBlocked(XYLocation loc)
public void makePerimeter()