edu.columbia.cs.coms4701.agent.environments.grid
Class AbstractGridEnvironment<K extends AgentAction,P extends AgentPercept,A extends Agent<K,P>>

java.lang.Object
  extended by edu.columbia.cs.coms4701.agent.environments.simple.AbstractEnvironment<K,P,A>
      extended by edu.columbia.cs.coms4701.agent.environments.grid.AbstractGridEnvironment<K,P,A>
All Implemented Interfaces:
Environment<K,P,A>, GridEnvironment<K,P,A>
Direct Known Subclasses:
PenteEnvironment, RoombaEnvironment

public abstract class AbstractGridEnvironment<K extends AgentAction,P extends AgentPercept,A extends Agent<K,P>>
extends AbstractEnvironment<K,P,A>
implements GridEnvironment<K,P,A>

A GridEnvironment abstract base class; takes care of the GridMap bookkeeping. *

Subclasses must implement:

and will probably want to implement:

Version:
0.1

User: aaron Date: Sep 24, 2006 Time: 5:29:08 PM

Author:
aaron@cs

Field Summary
protected  GridMap map
           
 
Fields inherited from class edu.columbia.cs.coms4701.agent.environments.simple.AbstractEnvironment
agents, counter, environmentObjects, environmentObservers
 
Constructor Summary
AbstractGridEnvironment()
           
 
Method Summary
 void addEnvironmentObject(EnvironmentObject theObject)
          Extended to note the addition of the first GridMap.
 GridMap getMap()
          Fetches the (first?) GridMap that was added to the environment.
 
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.simple.AbstractEnvironment
addAgent, addEnvironmentObserver, agentDrivenChange, dynamicChange, executeStep, getAgents, getCounter, getEnvironmentObjects, initialSetup, isDone, perceptsForAgent, run, startingToRunSetup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.columbia.cs.coms4701.agent.Environment
addAgent, addEnvironmentObserver, agentDrivenChange, dynamicChange, executeStep, getAgents, getCounter, getEnvironmentObjects, initialSetup, isDone, perceptsForAgent, run, startingToRunSetup
 

Field Detail

map

protected GridMap map
Constructor Detail

AbstractGridEnvironment

public AbstractGridEnvironment()
Method Detail

addEnvironmentObject

public void addEnvironmentObject(EnvironmentObject theObject)
Extended to note the addition of the first GridMap.

Specified by:
addEnvironmentObject in interface Environment<K extends AgentAction,P extends AgentPercept,A extends Agent<K,P>>
Overrides:
addEnvironmentObject in class AbstractEnvironment<K extends AgentAction,P extends AgentPercept,A extends Agent<K,P>>
Parameters:
theObject - the EnvironmentObject to add

getMap

public GridMap getMap()
Fetches the (first?) GridMap that was added to the environment.

Specified by:
getMap in interface GridEnvironment<K extends AgentAction,P extends AgentPercept,A extends Agent<K,P>>
Returns:
a GridMap, which should be the first added to the environment.