components
Class Wall

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by components.GameObject
          extended by components.Wall
All Implemented Interfaces:
ActionListener, KeyListener, EventListener

public class Wall
extends GameObject

Wall is a mutable object that specifies the outside boundaries of a GameSpace. Wall extends GameObject
Walls are inserted by the GameSpace itself, and are created in no other way.

Specification Fields

Field Summary
 
Fields inherited from class components.GameObject
center, coRef, delay, depth, frozen, g, height, name, orientAngle, orientVect, selected, shape, targets, velocity, visible
 
Constructor Summary
Wall(Map<String,String> props, GameSpace g)
           
Wall(Vect3 tlf, int length, int width, Vect3 ov, Angle oa, boolean visible, String name, GameSpace g)
           
 
Method Summary
protected  Map<String,String> defaults()
          sets all the defaults for this class.
 Vect3 getDiff()
          Difference between TLF and center.
 GameObjectClassification getGOClassification()
          Requires that all obejects return their own classification
 Set<Vect3> getOccupiedPositions()
           
protected  Shape shape()
          the Shape of the object
 
Methods inherited from class components.GameObject
action, actionPerformed, addTarget, clearTargets, equals, getBasicPropertyMap, getBounds, getCenter, getCoRef, getDelay, getDepth, getGameSpace, getHeight, getName, getNonRoundedTLF, getOrientAngle, getOrientVector, getRoundedTLF, getShape, getTargets, getTLF, getVelocity, getWidth, hashCode, isFrozen, isSelected, isVisible, onCollision, putInVect3, putInVect3, removeTarget, setCenter, setCoRef, setDelay, setDepth, setFrozen, setHeight, setOrientAngle, setOrientVect, setProperty, setSelected, setTLF, setVelocity, setVisible, setWidth, stepFrame, toString
 
Methods inherited from class java.awt.event.KeyAdapter
keyPressed, keyReleased, keyTyped
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Wall

public Wall(Vect3 tlf,
            int length,
            int width,
            Vect3 ov,
            Angle oa,
            boolean visible,
            String name,
            GameSpace g)
Parameters:
tlf - - the top left corner of the wall
ov - - the normal vector to the wall
oa - - tilt around ov
name - - a name
g - - the gamespace this wall is for
Effects:
creates a new Wall

Wall

public Wall(Map<String,String> props,
            GameSpace g)
Method Detail

getDiff

public Vect3 getDiff()
Description copied from class: GameObject
Difference between TLF and center. ZERO for balls, so should be overridden

Overrides:
getDiff in class GameObject
Returns:
a Vect3 that points from TLF to center. by default this is the center by width, height, depth

getGOClassification

public GameObjectClassification getGOClassification()
Description copied from class: GameObject
Requires that all obejects return their own classification

Specified by:
getGOClassification in class GameObject
Returns:
the GameObjectClassification of this object

shape

protected Shape shape()
Description copied from class: GameObject
the Shape of the object

Specified by:
shape in class GameObject

defaults

protected Map<String,String> defaults()
Description copied from class: GameObject
sets all the defaults for this class. override in subclass if you want different defaults must be called at the beginning of the constructor.

Overrides:
defaults in class GameObject

getOccupiedPositions

public Set<Vect3> getOccupiedPositions()
Specified by:
getOccupiedPositions in class GameObject
Returns:
a vect3 not in the GameSpace