wworld
Class GridObject

java.lang.Object
  |
  +--wworld.WorldObject
        |
        +--wworld.GridObject
Direct Known Subclasses:
Gold, MovingObject, Obstacle, Pit

public class GridObject
extends WorldObject

Class specifying gridobject. The object gridObject extends worldObject and contains information of the location and original location where it resided at the start of the game.


Constructor Summary
GridObject(int objType, int someX, int someY)
          Constructor with setting of object type, location and original location
 
Method Summary
 GridPoint getLocation()
          Returns the current location of the gridObject
 GridPoint getOrigLocation()
          Returns original location of the gridObject
 void setLocation(GridPoint p)
          Sets the location of the gridObject to the gridpoint specified.
 void setLocation(int x, int y)
          Sets the location of the gridObject to the location (x,y) specified.
 
Methods inherited from class wworld.WorldObject
getType, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridObject

public GridObject(int objType,
                  int someX,
                  int someY)
Constructor with setting of object type, location and original location

Method Detail

getOrigLocation

public GridPoint getOrigLocation()
Returns original location of the gridObject


getLocation

public GridPoint getLocation()
Returns the current location of the gridObject


setLocation

public void setLocation(GridPoint p)
Sets the location of the gridObject to the gridpoint specified.


setLocation

public void setLocation(int x,
                        int y)
Sets the location of the gridObject to the location (x,y) specified.