sysModel.fish.tests
Class Test_AFish.TestFish

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

private class Test_AFish.TestFish
extends AFish


Field Summary
 
Fields inherited from class sysModel.fish.AFish
_fishColor, _fishDisplay, _probOfBreeding, _probOfDying
 
Constructor Summary
Test_AFish.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_AFish.TestFish

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

move

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

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