edu.gatech.cs2335.lemmings.engine
Class GameEngine

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.engine.GameEngine

public class GameEngine
extends java.lang.Object

This class will manage the states of the game and their transitions. It will know when to go to the splash screen or the menu, or the game itself, and when to quit.

Author:
Vladimir Urazov

Field Summary
static boolean DEBUG
          Display a lot of debug information?
static boolean VERBOSE
          Display debug information?
 
Method Summary
 AbstractGameState getCurrentState()
          Access method for the currentState property.
 EstablishingConnectionState getEcs()
          Accessor for EstablishingConnectionState
static GameEngine getInstance()
          Singleton implementation.
 void receiveMessage(AbstractMessage msg)
          Describe receiveMessage method here.
 void setCurrentState(AbstractGameState aCurrentState)
          Sets the value of the currentState property.
 void showNetworkError(java.lang.String error)
          When a network error occurs, this function will be called.
 void startMultiGame()
          Describe startMultiGame method here.
 void startMultiLevel(int count, int lemmings)
          stuff.
 void startSingleLevel(java.lang.String name)
          Starts a single-player game with the specified level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

public static final boolean VERBOSE
Display debug information?

See Also:
Constant Field Values

DEBUG

public static final boolean DEBUG
Display a lot of debug information?

See Also:
Constant Field Values
Method Detail

getInstance

public static GameEngine getInstance()
Singleton implementation.

Returns:
a GameEngine value

showNetworkError

public void showNetworkError(java.lang.String error)
When a network error occurs, this function will be called.

Parameters:
error - a String value

startSingleLevel

public void startSingleLevel(java.lang.String name)
Starts a single-player game with the specified level.

Parameters:
name - a String value

getEcs

public EstablishingConnectionState getEcs()
Accessor for EstablishingConnectionState

Returns:
EstablishingConnectionState

startMultiGame

public void startMultiGame()
Describe startMultiGame method here.


startMultiLevel

public void startMultiLevel(int count,
                            int lemmings)
stuff.

Parameters:
count - an int value
lemmings - an int value

getCurrentState

public AbstractGameState getCurrentState()
Access method for the currentState property.

Returns:
the current value of the currentState property

setCurrentState

public void setCurrentState(AbstractGameState aCurrentState)
Sets the value of the currentState property. If the value passed in is NULL, will throw a NullPointerException.

Parameters:
aCurrentState - the new value of the currentState property

receiveMessage

public void receiveMessage(AbstractMessage msg)
Describe receiveMessage method here.

Parameters:
msg - an AbstractMessage value