sysModel.fish.tests
Class Test_Fish.TestFish

java.lang.Object
  extended by sysModel.fish.AFish
      extended by sysModel.fish.tests.Test_Fish.TestFish
All Implemented Interfaces:
java.lang.Cloneable, java.util.Observer
Enclosing class:
Test_Fish

private class Test_Fish.TestFish
extends AFish


Field Summary
 
Fields inherited from class sysModel.fish.AFish
_fishColor, _fishDisplay, _probOfBreeding, _probOfDying
 
Constructor Summary
Test_Fish.TestFish(java.awt.Color c)
           
 
Method Summary
 void age()
          Execute the aging part of a simulation step.
protected  void move()
          Execute the movement part of a simulation step.
 void paint(java.awt.Graphics2D g, java.awt.Component comp)
          Draw the fish.
 
Methods inherited from class sysModel.fish.AFish
act, breed, clone, die, draw, getColor, setLocalEnvironment, setProbOfBreeding, setProbOfDying, toString, tryBreedFwd, tryMoveFwd, turnLeft, turnLeft, turnRight, turnRight, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Test_Fish.TestFish

public Test_Fish.TestFish(java.awt.Color c)
Method Detail

move

protected void move()
Description copied from class: AFish
Execute the movement part of a simulation step. PART4

Specified by:
move in class AFish

paint

public void paint(java.awt.Graphics2D g,
                  java.awt.Component comp)
Description copied from class: AFish
Draw the fish. The Graphics2D object has been translated, rotated and scaled so that the origin is in the center of the fish. The fish should just be drawn from (-0.5, -0.5) to (0.5, 0.5).

Overrides:
paint in class AFish
Parameters:
g - graphics object to drawFish on.
comp - the component to drawFish on

age

public void age()
Description copied from class: AFish
Execute the aging part of a simulation step.

Overrides:
age in class AFish