2 * Copyright (c) 2002 Erik Rasmussen - All Rights Reserverd
7 * This is the main thread that drives the changes in the world.
9 * @author Erik Rasmussen
11 public class WorldThread
extends Thread
14 * The world this WorldThread is running on
18 * Whether or not the thread is running or should continue running
20 private boolean running
;
23 * Creates a new world thread to run on the given world
25 * @param world The world the thread should run for
27 public WorldThread(final World world
)
33 * Calls world.incrementTime() and sleeps for world.getDelay()
40 world
.incrementTime();
43 Thread
.sleep(world
.getDelay());
45 catch (InterruptedException e
)
53 * Returns whether or not this world thread is running or should continue
56 * @return Whether or not this world thread is running or should continue
59 public boolean getRunning()
65 * Sets whether or not this world thread is running or should continue to
68 * @param running Whether or not this world thread is running or should
71 public void setRunning(final boolean running
)