|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--universe.server.GameEngine
This is the main GameEngine thread. This class controls all of the turn submittals and turn processing.
Field Summary | |
private Database |
database
|
private boolean |
done
|
private java.lang.String |
gameName
|
private GameOptions |
gameoptions
|
private boolean |
gameOptionsSubmitted
|
static java.util.Random |
randomGen
|
private boolean |
running
|
private static GameEngine |
singleton
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
private |
GameEngine(java.lang.String gameName)
|
Method Summary | |
private void |
done()
|
static Database |
getDatabase()
|
static java.lang.String |
getGameName()
|
static GameEngine |
getInstance()
|
(package private) static void |
initialize(java.lang.String gameName)
|
boolean |
isDone()
Determine if the thread in this class has completed execution. |
private boolean |
isRunning()
|
void |
run()
|
void |
stopRunning()
Stop the game engine thread. |
void |
submitGameOptions(GameOptions options)
This function is used to submit and process the game options. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static GameEngine singleton
private Database database
private GameOptions gameoptions
private boolean gameOptionsSubmitted
private boolean running
private boolean done
private java.lang.String gameName
public static java.util.Random randomGen
Constructor Detail |
private GameEngine(java.lang.String gameName)
Method Detail |
static void initialize(java.lang.String gameName)
public static GameEngine getInstance()
public static java.lang.String getGameName()
public static Database getDatabase()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
private boolean isRunning()
public void stopRunning()
public boolean isDone()
private void done()
public void submitGameOptions(GameOptions options)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |