java.lang.Object
java.lang.Thread
org.dma.ihm.game.Game
- All Implemented Interfaces:
- java.lang.Runnable, java.io.Serializable
- public class Game
- extends java.lang.Thread
- implements java.io.Serializable
The Game class extends Threads, and is responsible for the loop of events
provided by the GameCalendar.
| Nested classes inherited from class java.lang.Thread |
java.lang.Thread.UncaughtExceptionHandler |
|
Constructor Summary |
Game()
Constructor for the Game object |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
listener
private java.util.Vector listener
- Listeners connected to the game class
suspended
private volatile boolean suspended
- Flag if thread is suspended
Game
public Game()
- Constructor for the Game object
setSuspended
public void setSuspended()
- should only be used after a loadScenario()
run
public void run()
- Run method. A bit complicated, cause suspend() and resume() are depricated
- Specified by:
run in interface java.lang.Runnable
moveOn
public void moveOn()
- MoveOn method called by the controller
addGameCalendarListener
public void addGameCalendarListener(org.dma.ihm.game.calendar.GameCalendarListener m)
- event-handling
processGameCalendarEvent
private void processGameCalendarEvent(org.dma.ihm.game.calendar.events.GameCalendarEvent m)
- event-handling