|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.caplet.manna.GAPainter
Does the evolution, and displays the results, in a separate thread than the rest of the applet. One thread evolves both dishes, so their generations will be exactly in synch.
When evolution is paused, the GAPainter thread still exists, but is paused, waiting to be told to go. It starts paused.
| Constructor Summary | |
GAPainter(GA[] gas)
Give it the array of GAs it should evolve. |
|
| Method Summary | |
void |
addManna(int cx,
int cy,
int amount)
Add the same amount of manna at the same place in all GAs. |
void |
go()
Let the evolution resume (or commence) |
void |
pause()
Stop the world, I want to play god. |
void |
run()
This is the "main"-like method for a Thread. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GAPainter(GA[] gas)
| Method Detail |
public void run()
run in interface java.lang.Runnablepublic void go()
public void pause()
public void addManna(int cx,
int cy,
int amount)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||