game.net
Class SCORESimulator

java.lang.Object
  extended by game.net.SCORESimulator
All Implemented Interfaces:
INetSimulator, java.lang.Runnable

public class SCORESimulator
extends java.lang.Object
implements INetSimulator, java.lang.Runnable

Run simulator side of SCORE protocol.

Version:
$Revision: 385 $ $Date: 2008-03-11 10:10:33 -0230 (Tue, 11 Mar 2008) $

Constructor Summary
SCORESimulator(ISimulatorNet sim)
           
 
Method Summary
 void gameOver(Side result)
          Inform teams that the game is over and who won.
 void gameReset()
          Inform teams that a game reset has occured.
 void goalScored(int westScore, int eastScore)
          Inform teams that a goal has been scored.
 boolean isAlive()
           
 void run()
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCORESimulator

public SCORESimulator(ISimulatorNet sim)
Method Detail

gameOver

public void gameOver(Side result)
Description copied from interface: INetSimulator
Inform teams that the game is over and who won.

Specified by:
gameOver in interface INetSimulator
Parameters:
result - the wining side. null indicates draw.

gameReset

public void gameReset()
Description copied from interface: INetSimulator
Inform teams that a game reset has occured.

Specified by:
gameReset in interface INetSimulator

goalScored

public void goalScored(int westScore,
                       int eastScore)
Description copied from interface: INetSimulator
Inform teams that a goal has been scored.

Specified by:
goalScored in interface INetSimulator
Parameters:
westScore - current score for team on WEST
eastScore - current score for team on EAST

run

public void run()
Specified by:
run in interface java.lang.Runnable

shutdown

public void shutdown()

isAlive

public boolean isAlive()