|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface of the environment local to a fish.
Method Summary | |
void |
drawFish(AFish fish,
java.awt.Graphics2D g,
java.awt.Component comp)
Draw the fish on the graphics object. |
java.lang.Object |
execute(AGlobalEnv.ILocalEnvVisitor visitor,
java.lang.Object param)
Execute a visitor on this local environment. |
void |
removeFish(AFish fish)
Remove the fish from the environment. |
void |
setState(ILocalEnvState state)
Set state. |
java.lang.String |
toString()
String representation of the local environment. |
java.lang.Object |
tryBreedFwd(AFish fish,
ILambda blockedCmd,
ILambda openCmd)
Attempt to breed the fish forward, which may or may not be successful. |
java.lang.Object |
tryMoveFwd(AFish fish,
ILambda blockedCmd,
ILambda openCmd)
Attempt to move the fish forward, which may or may not be successful. |
void |
turnRight(AFish fish,
double radians)
Turn the fish radians to the right. |
Method Detail |
public java.lang.Object tryMoveFwd(AFish fish, ILambda blockedCmd, ILambda openCmd)
fish
- AFish to moveblockedCmd
- lambda to apply if blockedopenCmd
- lambda to apply if open
public java.lang.Object tryBreedFwd(AFish fish, ILambda blockedCmd, ILambda openCmd)
fish
- AFish to moveblockedCmd
- lambda to apply if blockedopenCmd
- lambda to apply if open
public void drawFish(AFish fish, java.awt.Graphics2D g, java.awt.Component comp)
fish
- AFish to drawFishg
- graphics object to drawFish oncomp
- component to drawFish onpublic void turnRight(AFish fish, double radians)
fish
- AFish to turnradians
- radians to turnpublic void removeFish(AFish fish)
fish
- AFish to removepublic java.lang.Object execute(AGlobalEnv.ILocalEnvVisitor visitor, java.lang.Object param)
visitor
- visitor to executeparam
- visitor-specific parameter
public java.lang.String toString()
public void setState(ILocalEnvState state)
state
- new state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |