|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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 |
|---|
static final Name TURN_HOLDER_REPLACED
| Method Detail |
|---|
String getTurnHolderFieldName()
turnHolder field in the object that implements this
interface.
Name getTurnHolder()
null if no user
currently holds the turn.
void setTurnHolder(Name turnHolder)
turnHolder field be set to the specified
value.
Name[] getPlayers()
boolean isInPlay()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||