Class GameBoardTimer

java.lang.Object
games.stendhal.server.entity.mapstuff.game.GameBoardTimer
All Implemented Interfaces:
TurnListener

public class GameBoardTimer extends Object implements TurnListener
Handles a time out for the game
Author:
hendrik
  • Constructor Details

    • GameBoardTimer

      public GameBoardTimer(GameBoard gameBoard, int seconds)
      creates a new game board timer
      Parameters:
      gameBoard - gameBoard to time out
      seconds - maximum number of seconds for one game
  • Method Details

    • onTurnReached

      public void onTurnReached(int currentTurn)
      Description copied from interface: TurnListener
      This method is called when the turn number is reached.
      Specified by:
      onTurnReached in interface TurnListener
      Parameters:
      currentTurn - current turn number
    • start

      public void start()
      starts the timer
    • stop

      public void stop()
      stops the timer
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object