public class TrickCardGameManagerDelegate extends TurnGameManagerDelegate implements TrickCardGameProvider
| Constructor and Description |
|---|
TrickCardGameManagerDelegate() |
TrickCardGameManagerDelegate(CardGameManager manager)
Deprecated.
use the zero-argument constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
didInit(com.threerings.crowd.data.PlaceConfig config) |
void |
didStartup(com.threerings.crowd.data.PlaceObject plobj) |
void |
endHand()
Ends the hand of cards.
|
void |
endTrick()
Ends the trick.
|
void |
endTurn()
Called to end the turn.
|
void |
gameDidEnd()
Called by the game manager after the game ended.
|
void |
gameDidStart()
Called when the game has started.
|
void |
gameWillStart()
Called by the game manager when the game is about to start.
|
void |
init(com.threerings.crowd.server.PlaceManager plmgr,
com.threerings.presents.dobj.RootDObjectManager omgr,
com.threerings.presents.server.InvocationManager invmgr) |
void |
playCard(com.threerings.presents.data.ClientObject client,
Card card,
int handSize)
Handles a
TrickCardGameService.playCard(com.threerings.parlor.card.data.Card, int) request. |
void |
requestRematch(com.threerings.presents.data.ClientObject client)
Handles a
TrickCardGameService.requestRematch() request. |
void |
sendCardsToPlayer(com.threerings.presents.data.ClientObject client,
int toidx,
Card[] cards)
|
void |
startHand()
Starts a hand of cards.
|
void |
startTrick()
Starts a trick.
|
void |
startTurn()
Called to start the next turn.
|
getTurnHolderIndex, isPlayersTurn, playerWasReplacedgameWillEnd, gameWillReset, setAI, tickAIpublic TrickCardGameManagerDelegate()
@Deprecated public TrickCardGameManagerDelegate(CardGameManager manager)
public void init(com.threerings.crowd.server.PlaceManager plmgr,
com.threerings.presents.dobj.RootDObjectManager omgr,
com.threerings.presents.server.InvocationManager invmgr)
init in class com.threerings.crowd.server.PlaceManagerDelegatepublic void didInit(com.threerings.crowd.data.PlaceConfig config)
didInit in class TurnGameManagerDelegatepublic void didStartup(com.threerings.crowd.data.PlaceObject plobj)
didStartup in class TurnGameManagerDelegatepublic void gameWillStart()
GameManagerDelegategameWillStart in class GameManagerDelegatepublic void gameDidStart()
gameDidStart in class TurnGameManagerDelegatepublic void gameDidEnd()
GameManagerDelegategameDidEnd in class GameManagerDelegatepublic void startTurn()
TurnGameManagerDelegateTurnGameManager.turnWillStart() to allow our
owning manager to perform any pre-start turn processing, sets the turn holder that was
configured either when the game started or when finishing up the last turn, and then calls
TurnGameManager.turnDidStart() to allow the manager to perform any post-start turn
processing. This assumes that a valid turn holder has been assigned. If some pre-game
preparation needs to take place in a non-turn-based manner, this function should not be
called until it is time to start the first turn.startTurn in class TurnGameManagerDelegatepublic void endTurn()
TurnGameManagerDelegate
If the game is no longer in play (see TurnGameObject.isInPlay()) after having called
TurnGameManager.turnDidEnd() and TurnGameManagerDelegate.setNextTurnHolder(), then the next turn will
not automatically be started.
If the game is in play, but the next turn should not be started immediately, the game
manager should have TurnGameManagerDelegate.setNextTurnHolder() set the TurnGameManagerDelegate._turnIdx field to
-1 which will cause us to not start the next turn. To start things back up
again it would set TurnGameManagerDelegate._turnIdx to the next turn holder and call TurnGameManagerDelegate.startTurn()
itself.
endTurn in class TurnGameManagerDelegatepublic void startHand()
handWillStart(), sets the trick
state to PLAYING_HAND, and calls handDidStart().public void endHand()
handWillEnd(), sets the trick
state to BETWEEN_HANDS, and calls handDidEnd().public void startTrick()
trickWillStart(), sets the trick
state to PLAYING_TRICK, and calls trickDidStart().public void endTrick()
trickWillEnd(), sets the trick
state to PLAYING_HAND, and calls trickDidEnd().public void sendCardsToPlayer(com.threerings.presents.data.ClientObject client,
int toidx,
Card[] cards)
TrickCardGameProviderTrickCardGameService.sendCardsToPlayer(int, com.threerings.parlor.card.data.Card[]) request.sendCardsToPlayer in interface TrickCardGameProviderpublic void playCard(com.threerings.presents.data.ClientObject client,
Card card,
int handSize)
TrickCardGameProviderTrickCardGameService.playCard(com.threerings.parlor.card.data.Card, int) request.playCard in interface TrickCardGameProviderpublic void requestRematch(com.threerings.presents.data.ClientObject client)
TrickCardGameProviderTrickCardGameService.requestRematch() request.requestRematch in interface TrickCardGameProviderCopyright © 2015. All rights reserved.