lane.sente
Class Stone

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--lane.sente.GameElement
              |
              +--lane.sente.InanimateGameElement
                    |
                    +--lane.sente.Stone
All Implemented Interfaces:
java.lang.Runnable

public class Stone
extends InanimateGameElement

This is a simple InanimateElement. It is a stone, it just sits there


Fields inherited from class lane.sente.GameElement
health, radius, theContainer, theLocation, theVelocity
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Stone(Location theLocation, int radius, int health, RobotContainer theContainer)
          constructor
 
Method Summary
 void addListener(InanimateGameElementListener l)
          adds a listener to this stone
 void collision(GameElement other)
          called when the stone is collided with
protected  void updateListeners()
          updates the listeners of this stone
 void xCollision()
          called when a stone hits an x bound
 void yCollision()
          called when a stone hits an y bound
 void zCollision()
          called when a stone hits an z bound
 
Methods inherited from class lane.sente.GameElement
acceptDammage, getHealth, getLocation, getRadius, getVelocity, isCollision, setHealth, setLocation, setRadius
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Stone

public Stone(Location theLocation,
             int radius,
             int health,
             RobotContainer theContainer)
constructor
Parameters:
theLocation - The starting location for this stone
radius - The radius of the stone
health - The health of the stone
theContainer - The container in which the stone lives
Method Detail

collision

public void collision(GameElement other)
called when the stone is collided with
Overrides:
collision in class InanimateGameElement
Parameters:
other - The element colliding with this stone

addListener

public void addListener(InanimateGameElementListener l)
adds a listener to this stone
Parameters:
l - An inanimateGameElementListener intersted in this stone

updateListeners

protected void updateListeners()
updates the listeners of this stone
Overrides:
updateListeners in class GameElement

xCollision

public void xCollision()
called when a stone hits an x bound
Overrides:
xCollision in class GameElement

yCollision

public void yCollision()
called when a stone hits an y bound
Overrides:
yCollision in class GameElement

zCollision

public void zCollision()
called when a stone hits an z bound
Overrides:
zCollision in class GameElement