ppJava.serie04.oceanlife
Class Stone

java.lang.Object
  extended by ppJava.serie04.oceanlife.OceanObject
      extended by ppJava.serie04.oceanlife.Stone
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable

public class Stone
extends OceanObject

A stone falling down in the ocean

Author:
ken, bpei
See Also:
Serialized Form

Field Summary
(package private)  int fixedEndingPos
           
(package private)  int moveLimit
           
private static long serialVersionUID
           
 
Constructor Summary
Stone(int x, int y)
          Constructor for a stone at the position (x,y)
 
Method Summary
 void run()
          The movement of a stone
 void setMoveLimit(int moveLimit)
          Sets the Limit to where the stone is allowed to move
 java.lang.String toString()
           
 
Methods inherited from class ppJava.serie04.oceanlife.OceanObject
calcAbsDistance, changeDirections, checkBarrier, checkPosition, createImageIcon, genRandomVector, getBarrier, getBorders, getClassName, getDiffVector, getDistance, getImageIcon, getImageResource, getImageSize, getMoveVector, getObjectCount, getOffset, getPosition, hasSameDirection, incPosX, incPosY, isVulnerableTo, moveStep, normalizeImage, setBarrier, setBorders, setImageIcon, setImageResource, setImageSize, setMoveVector, setOffset, setPosition, switchMovementDirection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

moveLimit

int moveLimit

fixedEndingPos

int fixedEndingPos
Constructor Detail

Stone

public Stone(int x,
             int y)
Constructor for a stone at the position (x,y)

Parameters:
x -
y -
Method Detail

setMoveLimit

public void setMoveLimit(int moveLimit)
Sets the Limit to where the stone is allowed to move

Parameters:
moveLimit -

toString

public java.lang.String toString()
Overrides:
toString in class OceanObject

run

public void run()
The movement of a stone