ppJava.serie04.oceanlife
Class Plant

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

public class Plant
extends OceanObject

A plant, growing 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
Plant(int x, int y)
          Constructor for a plant at position (x,y)
 
Method Summary
 void run()
          The movement of a plant
 void setMoveLimit(int moveLimit)
          Sets the Limit to where the plant 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

Plant

public Plant(int x,
             int y)
Constructor for a plant at position (x,y)

Parameters:
x -
y -
Method Detail

setMoveLimit

public void setMoveLimit(int moveLimit)
Sets the Limit to where the plant 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 plant