au.com.solidsoftware.multimahjong.shared
Class MiniGame

java.lang.Object
  |
  +--au.com.solidsoftware.multimahjong.shared.MiniGame

public class MiniGame
extends java.lang.Object
implements java.io.Serializable

MiniGame is a minimal representation of a game used for transmitting between the MMC and MMS via RMI. It is just a data structure and as such, it just contains a constructor to initialise the data and public fields to store the data.

Author:
Michael Hart
See Also:
Serialized Form

Field Summary
 int limit
          The score limit of the game.
 java.lang.String ownerName
          The name of the player who created the game.
 int waitingToJoin
          The number of players that can join this game.
 
Constructor Summary
MiniGame(java.lang.String name, int limit)
          Initialises the name, limit and number of players available to join in the game.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

ownerName

public java.lang.String ownerName
The name of the player who created the game. To save on overhead due to serialization, this field is publicly accessible.

limit

public int limit
The score limit of the game. To save on overhead due to serialization, this field is publicly accessible.

waitingToJoin

public int waitingToJoin
The number of players that can join this game. To save on overhead due to serialization, this field is publicly accessible.
Constructor Detail

MiniGame

public MiniGame(java.lang.String name,
                int limit)
Initialises the name, limit and number of players available to join in the game. The number of players waiting to join is set to 3 because the player who created the game is already in it.
Parameters:
name - the name of the player who created the game
limit - the score limit of the game