|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.tankbattles.simulation.mission.AbstractMissionSimulator
public abstract class AbstractMissionSimulator
Super class for the mission simulators, which check for mission goals. Runs in a separate thread and locks on the same object as the OpenGL and each tank threads for sensible operations. Each concrete subclass has to implement the update() method, checking for mission acomplishment.
Constructor Summary | |
---|---|
AbstractMissionSimulator()
|
Method Summary | |
---|---|
static AbstractMissionSimulator |
createInstance(Mission mission,
java.lang.Object lock)
Factory method for concrete instance based on the given configuration. |
Mission |
getMission()
|
boolean |
isFinished()
|
void |
run()
Main thread loop for testing the mission acomplishment. |
abstract void |
update()
Called at each loop iteration inside the run method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMissionSimulator()
Method Detail |
---|
public static final AbstractMissionSimulator createInstance(Mission mission, java.lang.Object lock)
mission
- configuration object.lock
- for concurrency sensible operation
public Mission getMission()
public boolean isFinished()
public final void run()
run
in interface java.lang.Runnable
public abstract void update()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |