lab1
Class GameController

java.lang.Object
  extended by lab1.GameController
All Implemented Interfaces:
java.lang.Runnable

public class GameController
extends java.lang.Object
implements java.lang.Runnable

The controller class of the framework. Listens to user keystrokes and passes them on to the current game.


Constructor Summary
GameController(GameView view)
          Creats a new GameContoller associated with supplied view.
 
Method Summary
 void run()
          This code runs the game in a different thread.
 void startGame(GameModel gameModel)
          Starts a new game.
 void stopGame()
          Stops the currently running game, if any.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameController

public GameController(GameView view)
Creats a new GameContoller associated with supplied view.

Method Detail

startGame

public void startGame(GameModel gameModel)
Starts a new game.

Parameters:
gameModel - Game to start

stopGame

public void stopGame()
Stops the currently running game, if any.


run

public void run()
This code runs the game in a different thread.

Specified by:
run in interface java.lang.Runnable