game.protocol
Class EndReply

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

public class EndReply
extends Reply

Reply indicating that the game is over. Indicates the winner.

Invariant: mType == ENDGAME


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
EndReply(Side winner)
           
EndReply(java.lang.String msg)
           
 
Method Summary
 Side getWinner()
           
 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

EndReply

public EndReply(Side winner)
Parameters:
winner - which side won. null indicates draw.

EndReply

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

getWinner

public Side getWinner()
Returns:
Winning side or null in the case of a draw.

toString

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