fishbowl.strategy
Class Fish
java.lang.Object
cse115.graphics.AbstractGraphic
cse115.graphics.AbstractColorableGraphic
cse115.graphics.Polygon
fishbowl.Fish
fishbowl.strategy.Fish
- All Implemented Interfaces:
- CenterLocatable, Colorable, ColorableGraphic, Graphic, Locatable, Rotatable, Sizeable, Observer
public class Fish
- extends Fish
TODO: fill in comments for Fish
- Author:
- Adrienne M Decker
Created on: Oct 19, 2006
Constructor Summary |
Fish()
Creates a new instance of Fish |
Methods inherited from class cse115.graphics.AbstractGraphic |
addMouseListener, addMouseMotionListener, contains, getBounds, getCenterLocation, getContainer, getDimension, getMouseListeners, getMouseMotionListeners, getRotation, intersects, rotate, setCenterLocation, setContainer, setRotation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Fish
public Fish()
- Creates a new instance of Fish
setBehavior
public void setBehavior(IFishBehavior beh)
getBehavior
public IFishBehavior getBehavior()
update
public void update()
- Description copied from class:
Fish
- Update the position and orientation of the fish based on the
velocity. If the fish hits a wall, it reverses velocity in the
appropriate direction and points in the appropriate direction
too.
- Overrides:
update
in class Fish