group1.model.gameobject.terrain
Class Terrain

java.lang.Object
  extended by group1.model.gameobject.GameObj
      extended by group1.model.gameobject.terrain.Terrain
Direct Known Subclasses:
EnvironmentBoundary, Ground

public class Terrain
extends GameObj

A GameObj that represents unmoving, solid ground.


Field Summary
 
Fields inherited from class group1.model.gameobject.GameObj
acceleration, ENEMY_TEAM, GRID_SPACE_SIZE, id, isMovable, JEFF_TEAM, NO_TEAM, regions, shape, velocity
 
Constructor Summary
Terrain()
          Default constructor.
Terrain(double w, double h)
          Constructor, with position defaulted to (0, 0).
Terrain(double x, double y, double w, double h)
          Constructor.
 
Method Summary
 XYPair move(Environment env)
          Ask the object where it wants to move (which would be, quite simply, nowhere).
 
Methods inherited from class group1.model.gameobject.GameObj
addRegion, addRegion, getAcceleration, getAccelerationX, getAccelerationY, getHeight, getID, getNumRegions, getPosition, getPositionX, getPositionY, getRectangle, getRegion, getTeam, getVelocity, getVelocityX, getVelocityY, getWidth, intersectRegions, isMovable, makeRegions, makeSolid, setAcceleration, setAcceleration, setAccelerationX, setAccelerationY, setID, setPosition, setPosition, setPositionX, setPositionY, setRectangle, setSize, setTeam, setVelocity, setVelocity, setVelocityX, setVelocityY, stopHorizontal, stopVertical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Terrain

public Terrain()
Default constructor.


Terrain

public Terrain(double x,
               double y,
               double w,
               double h)
Constructor.

Parameters:
x - The x-position.
y - The y-position.
w - The width.
h - The height.

Terrain

public Terrain(double w,
               double h)
Constructor, with position defaulted to (0, 0).

Parameters:
w - The width.
h - The height.
Method Detail

move

public XYPair move(Environment env)
Ask the object where it wants to move (which would be, quite simply, nowhere).

Specified by:
move in class GameObj
Parameters:
env - The environment this object is in.
Returns:
Zero velocity, represented as an X-Y coordinate pair.
See Also:
GameObj