group1.model
Class EnvironmentGridSpace

java.lang.Object
  extended by 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.


Constructor Summary
EnvironmentGridSpace()
           
EnvironmentGridSpace(double x, double y, double side_length)
           
 
Method Summary
 void addObject(GameObj object)
           
 int getNumObjects()
           
 GameObj getObject(int i)
           
 java.util.List<GameObj> getObjects()
           
 XYPair getPosition()
           
 java.awt.geom.Rectangle2D getSquare()
           
 void removeObject(GameObj object)
           
 void removeObject(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentGridSpace

public EnvironmentGridSpace()

EnvironmentGridSpace

public EnvironmentGridSpace(double x,
                            double y,
                            double side_length)
Method Detail

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()