Class Game

  • All Implemented Interfaces:
    IGame, ch.sahits.game.openpatrician.utilities.model.IGameType

    public class Game
    extends java.lang.Object
    implements IGame, ch.sahits.game.openpatrician.utilities.model.IGameType
    Implementation of the game
    Author:
    Andi Hotz, (c) Sahits GmbH, 2011 Created on Sep 16, 2011
    • Method Detail

      • setGameSpeed

        public void setGameSpeed​(EGameSpeed speed)
        Description copied from interface: IGame
        Set a new game speed
        Specified by:
        setGameSpeed in interface IGame
        Parameters:
        speed - new game speed.
      • handleMessage

        public void handleMessage​(DisplayMessage message)
      • normalSpeed

        public void normalSpeed()
        Description copied from interface: IGame
        Return to normal speed.
        Specified by:
        normalSpeed in interface IGame
      • fastForward

        public void fastForward()
        Description copied from interface: IGame
        Switch to fast forward until the first interuption.
        Specified by:
        fastForward in interface IGame
      • isObjectivReached

        public boolean isObjectivReached()
        Description copied from interface: IGame
        check if the objective of the game is reached. This method may not be called by the server part
        Specified by:
        isObjectivReached in interface IGame
        Returns:
        flag indicating of the game objective has been reached
      • isSinglePlayer

        public boolean isSinglePlayer()
        Specified by:
        isSinglePlayer in interface ch.sahits.game.openpatrician.utilities.model.IGameType
      • getGameSpeed

        public EGameSpeed getGameSpeed()
        Description copied from interface: IGame
        Retrieve the current game speed
        Specified by:
        getGameSpeed in interface IGame
        Returns:
        current game speed
      • gameSpeedProperty

        public javafx.beans.property.ObjectProperty<EGameSpeed> gameSpeedProperty()
        Description copied from interface: IGame
        Property for the game speed.
        Specified by:
        gameSpeedProperty in interface IGame
        Returns:
        property of the current game speed.