game.protocol
Class GoalReply
java.lang.Object
game.protocol.Reply
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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)
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