de.unifreiburg.twodeedoo.model.test
Class FakeGameController

java.lang.Object
  extended by de.unifreiburg.twodeedoo.model.test.FakeGameController
All Implemented Interfaces:
IGameController

public class FakeGameController
extends java.lang.Object
implements IGameController

IGameController fake for testing.

Author:
anton

Constructor Summary
FakeGameController()
           
 
Method Summary
 IKeyHandler getKeyHandler()
           
 ISchedulable getMainSchedulable()
           
 boolean isActivitySwitched()
          Has IGameController.switchToActivity(IActivity) been called since the start of this event distribution cycle?
 void quitGame()
          Quit the game intentionally.
 void restartGame()
          Restart the game from the beginning.
 void switchToActivity(IActivity newActivity)
          Tell the simulator to run a new activity instead of the current activity.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeGameController

public FakeGameController()
Method Detail

getKeyHandler

public IKeyHandler getKeyHandler()
Returns:
the keyHandler

getMainSchedulable

public ISchedulable getMainSchedulable()
Returns:
the mainSchedulable

switchToActivity

public void switchToActivity(IActivity newActivity)
Description copied from interface: IGameController
Tell the simulator to run a new activity instead of the current activity.

Specified by:
switchToActivity in interface IGameController
Parameters:
newActivity - another activity.

isActivitySwitched

public boolean isActivitySwitched()
Description copied from interface: IGameController
Has IGameController.switchToActivity(IActivity) been called since the start of this event distribution cycle?

Specified by:
isActivitySwitched in interface IGameController
Returns:
true if it has.

quitGame

public void quitGame()
Description copied from interface: IGameController
Quit the game intentionally. This usually even exits the program.

Specified by:
quitGame in interface IGameController

restartGame

public void restartGame()
Description copied from interface: IGameController
Restart the game from the beginning. If that isn't possible, quit.

Specified by:
restartGame in interface IGameController