group1.model
Class EnvironmentGridSpace
java.lang.Object
group1.model.EnvironmentGridSpace
public class EnvironmentGridSpace
- extends java.lang.Object
A space on the Environment grid. This contains a list of GameObj's at that location on the grid.
This is not used to store the data directly. Rather, this is used to speed up computations, with
the small overhead that the Environment class must keep the grid's object lists accurate.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnvironmentGridSpace
public EnvironmentGridSpace()
EnvironmentGridSpace
public EnvironmentGridSpace(double x,
double y,
double side_length)
getObjects
public java.util.List<GameObj> getObjects()
getObject
public GameObj getObject(int i)
getNumObjects
public int getNumObjects()
addObject
public void addObject(GameObj object)
removeObject
public void removeObject(GameObj object)
removeObject
public void removeObject(int i)
getPosition
public XYPair getPosition()
getSquare
public java.awt.geom.Rectangle2D getSquare()