RePast
v. 2.0

uchicago.src.sim.life
Interface Space

All Known Implementing Classes:
InfiniteLifeSpace, LifeSpace

public interface Space

Interface for spaces in the Life model. Life contains both an "infinite" space and a toroidal grid. We want to be able to treat them the same. This inteface allows us to do so.


Method Summary
 void addAgent(LifeAgent agent)
           
 Displayable getDisplay()
           
 int getNumNeighbors(int x, int y)
           
 int getXSize()
           
 int getYSize()
           
 boolean isEmptyAt(int x, int y)
           
 void remove(LifeAgent agent)
           
 void removeAgentAt(int x, int y)
           
 void step(ArrayList list)
           
 

Method Detail

remove

public void remove(LifeAgent agent)

removeAgentAt

public void removeAgentAt(int x,
                          int y)

addAgent

public void addAgent(LifeAgent agent)

getNumNeighbors

public int getNumNeighbors(int x,
                           int y)

isEmptyAt

public boolean isEmptyAt(int x,
                         int y)

getDisplay

public Displayable getDisplay()

step

public void step(ArrayList list)

getXSize

public int getXSize()

getYSize

public int getYSize()

RePast
v. 2.0

Bug reports and feature requests to RePast