game.protocol
Class GoalReply

java.lang.Object
  extended by game.protocol.Reply
      extended by game.protocol.GoalReply

public class GoalReply
extends Reply

The first reply after a goal has been scored. Gives the score for both sides.

Invariant: mType == GOAL


Nested Class Summary
 
Nested classes/interfaces inherited from class game.protocol.Reply
Reply.ReplyType
 
Field Summary
 
Fields inherited from class game.protocol.Reply
log, mServerLog, mType
 
Constructor Summary
GoalReply(int west, int east)
           
GoalReply(java.lang.String msg)
           
 
Method Summary
 int getScore(Side t)
          Get the new score for a team
 java.lang.String toString()
           
 
Methods inherited from class game.protocol.Reply
factory, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GoalReply

public GoalReply(java.lang.String msg)
          throws ParseException
Parameters:
msg - the message text
Throws:
ParseException - message format is incorrect.

GoalReply

public GoalReply(int west,
                 int east)
Method Detail

getScore

public int getScore(Side t)
Get the new score for a team

Parameters:
t - the Team
Returns:
current score for t

toString

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