|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unifreiburg.twodeedoo.world.WorldApplication
public class WorldApplication
Application which runs one IWorld
.
Simplest way of using this class: call static method runWorld(IWorld)
with an instance of your world. That will open a window of the right size
and run the simulation until your world calls quit.
Constructor Summary | |
---|---|
WorldApplication(IWorld world)
Create an application to run one world. |
Method Summary | |
---|---|
void |
init()
All one-time initializations, all begin-of-game initializations |
void |
run()
This will be the first method to be run. |
static void |
runWorld(IWorld world)
Friendly all-in-one service to run a world: create a window, simulate the world etc. |
void |
startPlaying()
Start interacting with the game. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorldApplication(IWorld world)
world
- the world to be run.Method Detail |
---|
public void startPlaying()
public void init() throws java.io.IOException
java.io.IOException
- picture loading failure.public void run()
run
in interface java.lang.Runnable
public static void runWorld(IWorld world)
world
- some world.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |