group1.model
Class Game

java.lang.Object
  extended by group1.model.Game
All Implemented Interfaces:
java.lang.Runnable

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


Constructor Summary
Game()
          The game constructor.
 
Method Summary
 Jeff getJeff()
          Returns Jeff to the master class
 int getLevelCount()
          Returns the result of the level counter.
 void incrementLevelCount()
          Increment the level counter by one (when Jeff reaches the end of a level
 int inTheMainMenu()
          In the main menu...
 java.lang.String levelName()
          Returns the appropriate level name when passed the level counter.
 void run()
          Run
 void setBuyMenuListener(ModelListener m)
          Sets the buy menu listener
 void setContinueMenuListener(ModelListener m)
          Sets the continue menu listener
 void setEndOfLevelListener(ModelListener m)
          Sets the end of level listener
 void setInGameListener(ModelListener m)
          Sets the in game listener
 void setInstructionsListener(ModelListener m)
          Sets the instructions listener
 void setJeffDiesListener(ModelListener m)
          Sets the Jeff dies listener
 void setLoadListener(ModelListener m)
          Sets the load listener
 void setMainMenuListener(ModelListener m)
          Sets the main menu listener
 void setNewGameListener(ModelListener m)
          Sets the new game listener
 void setPauseMenuListener(ModelListener m)
          Sets the pause menu listener
 void setSaveListener(ModelListener m)
          Sets the save listener
 void setStartOfLevelListener(ModelListener m)
          Sets the set start of level listener
 void setWeaponsSwtichMenuListener(ModelListener m)
          Sets the weapon switch menu listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Game

public Game()
The game constructor. Creats a Jeff, an Environment, and loads the picture cache.

Method Detail

run

public void run()
Run

Specified by:
run in interface java.lang.Runnable

incrementLevelCount

public void incrementLevelCount()
Increment the level counter by one (when Jeff reaches the end of a level


getLevelCount

public int getLevelCount()
Returns the result of the level counter.

Returns:
the level count result

levelName

public java.lang.String levelName()
Returns the appropriate level name when passed the level counter.

Returns:
the appropriate levelString

getJeff

public Jeff getJeff()
Returns Jeff to the master class

Returns:
The game's Jeff

setMainMenuListener

public void setMainMenuListener(ModelListener m)
Sets the main menu listener

Parameters:
m - the model listener

setPauseMenuListener

public void setPauseMenuListener(ModelListener m)
Sets the pause menu listener

Parameters:
m - the model listener

setBuyMenuListener

public void setBuyMenuListener(ModelListener m)
Sets the buy menu listener

Parameters:
m - the model listener

setContinueMenuListener

public void setContinueMenuListener(ModelListener m)
Sets the continue menu listener

Parameters:
m - the model listener

setWeaponsSwtichMenuListener

public void setWeaponsSwtichMenuListener(ModelListener m)
Sets the weapon switch menu listener

Parameters:
m - the model listener

setNewGameListener

public void setNewGameListener(ModelListener m)
Sets the new game listener

Parameters:
m - the model listener

setSaveListener

public void setSaveListener(ModelListener m)
Sets the save listener

Parameters:
m - the model listener

setLoadListener

public void setLoadListener(ModelListener m)
Sets the load listener

Parameters:
m - the model listener

setInstructionsListener

public void setInstructionsListener(ModelListener m)
Sets the instructions listener

Parameters:
m - the model listener

setStartOfLevelListener

public void setStartOfLevelListener(ModelListener m)
Sets the set start of level listener

Parameters:
m - the model listener

setEndOfLevelListener

public void setEndOfLevelListener(ModelListener m)
Sets the end of level listener

Parameters:
m - the model listener

setJeffDiesListener

public void setJeffDiesListener(ModelListener m)
Sets the Jeff dies listener

Parameters:
m - the model listener

setInGameListener

public void setInGameListener(ModelListener m)
Sets the in game listener

Parameters:
m - the model listener

inTheMainMenu

public int inTheMainMenu()
In the main menu...