| java.lang.Object | ||
| ↳ | mobisocial.socialkit.musubi.multiplayer.Multiplayer | |
| ↳ | mobisocial.socialkit.musubi.multiplayer.TurnBasedApp | |
Manages the state machine associated with a turn-based multiplayer application.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | NO_TURN | ||||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
mobisocial.socialkit.musubi.multiplayer.Multiplayer
| |||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DBG | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Often called in an activity's onPause method.
| |||||||||||
Often called in an activity's onResume method.
| |||||||||||
Returns a cursor within the membership list that points to
the user with control of the state machine.
| |||||||||||
Returns the latest application state.
| |||||||||||
Returns the index within the membership list that represents the
local user.
| |||||||||||
Returns the array of member identifiers.
| |||||||||||
Returns true if the local member index equals the membership cursor.
| |||||||||||
Prepares a new TurnBasedApp object that can be inserted into a feed.
| |||||||||||
Updates the state machine with the user's move, passing control
to nextPlayer.
| |||||||||||
Updates the state machine with the user's move, passing control to
the next player in
getMembers(). | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a view suitable for display in a feed.
| |||||||||||
Override this method to handle state updates to this turn-basd app.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
mobisocial.socialkit.musubi.multiplayer.Multiplayer
| |||||||||||
From class
java.lang.Object
| |||||||||||
Often called in an activity's onPause method.
Often called in an activity's onResume method.
Returns a cursor within the membership list that points to the user with control of the state machine.
Returns the index within the membership list that represents the local user.
Returns true if the local member index equals the membership cursor. In other words, its the local user's turn.
Prepares a new TurnBasedApp object that can be inserted into a feed. Once inserted, the object can be used to create a new TurnBasedApp instance via TurnBasedApp#TurnBasedApp(DbObj).
Updates the state machine with the user's move, passing control to nextPlayer. The state machine is only updated if it is the local user's turn.
Updates the state machine with the user's move, passing control to
the next player in getMembers(). The state machine
is only updated if it is the local user's turn.
Returns a view suitable for display in a feed.
Override this method to handle state updates to this turn-basd app.