heurgame
Class Referee

java.lang.Object
  extended byheurgame.Referee
All Implemented Interfaces:
GameListener, TurnListener
Direct Known Subclasses:
DefaultReferee

public abstract class Referee
extends java.lang.Object
implements GameListener, TurnListener

Author:
David Kaplin The referee is the middleman in any game. He deals with both the high-level of the rules of the game and the low-level details of the actual players. The referee may or may not decide who stays or leaves but it is his action that forces its execution.

Constructor Summary
Referee()
           
 
Method Summary
abstract  void addPlayer(PlayerProxy p)
          Adds a new player, should trigger the game to send a player event.
abstract  void rejectAllPlayers()
          The quick way to force a game reset.
abstract  void reportIncrementalStatus()
          Reports the latest change in the game to all players
abstract  void reportStatus(PlayerToken uninformed)
          Reports the state of the game to all players execpt a particular one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface heurgame.event.GameListener
gameEnded, gameSetup, gameStarted
 
Methods inherited from interface heurgame.event.TurnListener
turnChanged
 

Constructor Detail

Referee

public Referee()
Method Detail

addPlayer

public abstract void addPlayer(PlayerProxy p)
Adds a new player, should trigger the game to send a player event.

Parameters:
p - the new player attached to the game.

rejectAllPlayers

public abstract void rejectAllPlayers()
The quick way to force a game reset.


reportStatus

public abstract void reportStatus(PlayerToken uninformed)
Reports the state of the game to all players execpt a particular one

Parameters:
uninformed - not told status

reportIncrementalStatus

public abstract void reportIncrementalStatus()
Reports the latest change in the game to all players