com.threerings.parlor.turn.data
Interface TurnGameObject

All Known Subinterfaces:
TrickCardGameObject

public interface TurnGameObject

Games that wish to support turn-based play must implement this interface with their GameObject.


Field Summary
static Name TURN_HOLDER_REPLACED
          A special value used to communicate to the client that the current turn holder was replaced (perhaps due to disconnection or departure and being replaced by an AI).
 
Method Summary
 Name[] getPlayers()
          Returns the array of player names involved in the game.
 Name getTurnHolder()
          Returns the username of the player who is currently taking their turn in this turn-based game or null if no user currently holds the turn.
 String getTurnHolderFieldName()
          Returns the distributed object field name of the turnHolder field in the object that implements this interface.
 boolean isInPlay()
          Returns true if the game is in play, false if not.
 void setTurnHolder(Name turnHolder)
          Requests that the turnHolder field be set to the specified value.
 

Field Detail

TURN_HOLDER_REPLACED

static final Name TURN_HOLDER_REPLACED
A special value used to communicate to the client that the current turn holder was replaced (perhaps due to disconnection or departure and being replaced by an AI).

Method Detail

getTurnHolderFieldName

String getTurnHolderFieldName()
Returns the distributed object field name of the turnHolder field in the object that implements this interface.


getTurnHolder

Name getTurnHolder()
Returns the username of the player who is currently taking their turn in this turn-based game or null if no user currently holds the turn.


setTurnHolder

void setTurnHolder(Name turnHolder)
Requests that the turnHolder field be set to the specified value.


getPlayers

Name[] getPlayers()
Returns the array of player names involved in the game.


isInPlay

boolean isInPlay()
Returns true if the game is in play, false if not. If a game is not in play after a turn has ended, the next turn will not be started.