Class Game
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.impl.Game
-
-
Constructor Summary
Constructors Constructor Description Game(EObjective objective, Difficulty difficulty, EGameSpeed speed, boolean singleplayer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfastForward()Switch to fast forward until the first interuption.javafx.beans.property.ObjectProperty<EGameSpeed>gameSpeedProperty()Property for the game speed.EGameSpeedgetGameSpeed()Retrieve the current game speedvoidhandleMessage(DisplayMessage message)booleanisObjectivReached()check if the objective of the game is reached.booleanisSinglePlayer()voidnormalSpeed()Return to normal speed.voidsetGameSpeed(EGameSpeed speed)Set a new game speed-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.IGame
getDifficulty, getMap
-
-
-
-
Constructor Detail
-
Game
public Game(EObjective objective, Difficulty difficulty, EGameSpeed speed, boolean singleplayer)
-
-
Method Detail
-
setGameSpeed
public void setGameSpeed(EGameSpeed speed)
Description copied from interface:IGameSet a new game speed- Specified by:
setGameSpeedin interfaceIGame- Parameters:
speed- new game speed.
-
handleMessage
public void handleMessage(DisplayMessage message)
-
normalSpeed
public void normalSpeed()
Description copied from interface:IGameReturn to normal speed.- Specified by:
normalSpeedin interfaceIGame
-
fastForward
public void fastForward()
Description copied from interface:IGameSwitch to fast forward until the first interuption.- Specified by:
fastForwardin interfaceIGame
-
isObjectivReached
public boolean isObjectivReached()
Description copied from interface:IGamecheck if the objective of the game is reached. This method may not be called by the server part- Specified by:
isObjectivReachedin interfaceIGame- Returns:
- flag indicating of the game objective has been reached
-
isSinglePlayer
public boolean isSinglePlayer()
- Specified by:
isSinglePlayerin interfacech.sahits.game.openpatrician.utilities.model.IGameType
-
getGameSpeed
public EGameSpeed getGameSpeed()
Description copied from interface:IGameRetrieve the current game speed- Specified by:
getGameSpeedin interfaceIGame- Returns:
- current game speed
-
gameSpeedProperty
public javafx.beans.property.ObjectProperty<EGameSpeed> gameSpeedProperty()
Description copied from interface:IGameProperty for the game speed.- Specified by:
gameSpeedPropertyin interfaceIGame- Returns:
- property of the current game speed.
-
-