edu.cuny.cat.server
Class ClockController

java.lang.Object
  extended by edu.cuny.cat.server.ClockController
All Implemented Interfaces:
AuctionEventListener
Direct Known Subclasses:
AutoClockController, EventBasedClockController, SynchronousClockController

public abstract class ClockController
extends java.lang.Object
implements AuctionEventListener

A clock controller controls the game clock. The game controller hands over the control to a clock control after a game is initialized. It is abstract because it is left to child classes to determine when stop() will is called.

Version:
$Revision: 1.4 $
Author:
Jinzhong Niu

Field Summary
static java.lang.String P_DEF_BASE
           
 
Constructor Summary
ClockController()
           
 
Method Summary
 void eventOccurred(AuctionEvent event)
           
protected  void pauseClock()
           
protected  void quitGame()
           
protected  void resumeClock()
           
 void start()
          starts the game clock, or asks an external source to decide when to start.
protected  void startClock()
           
 void stop()
          stops the game clock.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_DEF_BASE

public static final java.lang.String P_DEF_BASE
See Also:
Constant Field Values
Constructor Detail

ClockController

public ClockController()
Method Detail

eventOccurred

public void eventOccurred(AuctionEvent event)
Specified by:
eventOccurred in interface AuctionEventListener

start

public void start()
starts the game clock, or asks an external source to decide when to start.


stop

public void stop()
stops the game clock. When this method will be called is up to the child class that extends this class.


startClock

protected void startClock()

pauseClock

protected void pauseClock()

resumeClock

protected void resumeClock()

quitGame

protected void quitGame()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object