public class GameInstance
extends java.lang.Object
Constructor and Description |
---|
GameInstance(java.lang.String instanceId)
A GameInstance contains the most recent values
for the leader and players of a particular game instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getInstanceId()
Return the instance id of this instance.
|
java.lang.String |
getLeader()
Return the current leader of this instance.
|
java.lang.String |
getMessageTime(java.lang.String type)
Return the most recently put time string for this type.
|
java.util.List<java.lang.String> |
getPlayers()
Return the list of players currently in this instance.
|
void |
putMessageTime(java.lang.String type,
java.lang.String time)
Puts a new time string for the specified message type.
|
void |
setLeader(java.lang.String leader)
Sets the leader of this instance.
|
PlayerListDelta |
setPlayers(java.util.List<java.lang.String> newPlayersList)
Sets the players of this instances to currentPlayersList.
|
public GameInstance(java.lang.String instanceId)
instanceId
- The unique String that identifies this
instance.public java.lang.String getInstanceId()
public java.lang.String getLeader()
public void setLeader(java.lang.String leader)
leader
- The email address of the new leader.public PlayerListDelta setPlayers(java.util.List<java.lang.String> newPlayersList)
newPlayersList
- All players currently in the instance.public java.util.List<java.lang.String> getPlayers()
public java.lang.String getMessageTime(java.lang.String type)
type
- The message type.public void putMessageTime(java.lang.String type, java.lang.String time)
type
- The message type.time
- A string representing the time the message
was created.