|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TurnGameManager
A game manager that wishes to make use of the turn game services should
implement this interface and create a TurnGameManagerDelegate
which will perform the basic turn game processing and call back to the
main manager via this interface.
The basic flow of a turn-based game is as follows:
GameManager.gameWillStart()
GameManager.gameDidStart()
TurnGameManagerDelegate.setFirstTurnHolder()
TurnGameManagerDelegate.startTurn()
TurnGameManager.turnWillStart()
TurnGameManagerDelegate.endTurn()
TurnGameManager.turnDidEnd()
TurnGameManagerDelegate.setNextTurnHolder()
TurnGameManagerDelegate.startTurn()
...
GameManager.endGame()
| Method Summary | |
|---|---|
int |
getPlayerCount()
Extending GameManager should automatically handle
implementing this method. |
int |
getPlayerIndex(Name username)
Extending GameManager should automatically handle
implementing this method. |
Name |
getPlayerName(int index)
Extending GameManager should automatically handle
implementing this method. |
boolean |
isActivePlayer(int pidx)
Extending GameManager should automatically handle
implementing this method. |
void |
turnDidEnd()
Called when the turn was ended. |
void |
turnDidStart()
Called when we have started the next turn. |
void |
turnWillStart()
Called when we are about to start the next turn. |
| Method Detail |
|---|
Name getPlayerName(int index)
GameManager should automatically handle
implementing this method.
int getPlayerIndex(Name username)
GameManager should automatically handle
implementing this method.
int getPlayerCount()
GameManager should automatically handle
implementing this method.
boolean isActivePlayer(int pidx)
GameManager should automatically handle
implementing this method.
void turnWillStart()
void turnDidStart()
void turnDidEnd()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||