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

Fields
`static com.threerings.util.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

All Methods Instance Methods Abstract Methods
`com.threerings.util.Name[]` `getPlayers()` Returns the array of player names involved in the game.
`com.threerings.util.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(com.threerings.util.Name turnHolder)` Requests that the `turnHolder` field be set to the specified value.

### Field Detail

#### TURN_HOLDER_REPLACED

    static final com.threerings.util.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

    com.threerings.util.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(com.threerings.util.Name turnHolder)

Requests that the `turnHolder` field be set to the specified value.

#### getPlayers

    com.threerings.util.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.