org.jogre.common.comm
Class CommGameOver
java.lang.Object
org.jogre.common.comm.CommGameMessage
org.jogre.common.comm.CommTableMessage
org.jogre.common.comm.CommGameOver
- All Implemented Interfaces:
- IGameOver, ITransmittable
- public class CommGameOver
- extends CommTableMessage
- implements IGameOver
Communication object which describes a game over.
- Version:
- Alpha 0.2.3
- Author:
- Bob Marks
Constructor Summary |
CommGameOver(int resultType)
Message which is sent a client to the server to inform that a game is
over. |
CommGameOver(int tableNum,
GameOver gameOver)
Constructor which takes a table number and a game over message. |
CommGameOver(XMLElement message)
Constructor which reads the game over object from an XML element. |
CommGameOver
public CommGameOver(int tableNum,
GameOver gameOver)
- Constructor which takes a table number and a game over message.
This is sent from the server to a client.
- Parameters:
tableNum
- Table number.gameOver
- Game over message.
CommGameOver
public CommGameOver(int resultType)
- Message which is sent a client to the server to inform that a game is
over. The server generally does its own check to ensure that this
is correct.
- Parameters:
resultType
- Result type (see IGameOver).
CommGameOver
public CommGameOver(XMLElement message)
- Constructor which reads the game over object from an XML element.
- Parameters:
message
- XML element version of object.
getGameOver
public GameOver getGameOver()
- Return the score. If its a draw this will probobly be 0, a win a
positive number and a negative number depending on the game.
- Returns:
- score increment.
flatten
public XMLElement flatten()
- Flatten communciation object.
- Specified by:
flatten
in interface ITransmittable
- Returns:
- XML version of the state of an object which can be constructed again.
- See Also:
ITransmittable.flatten()