org.vizzini.game.event
Class GameManager

java.lang.Object
  extended by org.vizzini.util.event.AbstractManager
      extended by org.vizzini.game.event.GameManager

public class GameManager
extends AbstractManager

Provides a manager of game listeners and convenience methods for creating game events.

Since:
v0.1
Version:
v0.2
Author:
Jeffrey M. Thompson

Constructor Summary
GameManager()
           
 
Method Summary
 void addGameListener(IGameListener listener)
          Add the given listener.
protected  void fireChange(IListener listener0, IEvent event0)
          Fire the given event to the given listener.
 void fireGameChange(boolean oldGameOver, boolean isGameOver, IAgent winner)
          Fire a game event.
 void fireGameChange(GameEvent event)
          Fire the given state event to all registered listeners.
 void removeGameListener(IGameListener listener)
          Remove the given listener.
 
Methods inherited from class org.vizzini.util.event.AbstractManager
addListener, fireChange, isFiringChanges, removeListener, setFiringChanges
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameManager

public GameManager()
Method Detail

addGameListener

public void addGameListener(IGameListener listener)
Add the given listener.

Since:
v0.1

fireGameChange

public void fireGameChange(boolean oldGameOver,
                           boolean isGameOver,
                           IAgent winner)
Fire a game event.

Since:
v0.1

fireGameChange

public void fireGameChange(GameEvent event)
Fire the given state event to all registered listeners.

Since:
v0.1

removeGameListener

public void removeGameListener(IGameListener listener)
Remove the given listener.

Since:
v0.1

fireChange

protected void fireChange(IListener listener0,
                          IEvent event0)
Fire the given event to the given listener.

Specified by:
fireChange in class AbstractManager
Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02