|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.samskivert.swing.Controller
com.threerings.crowd.client.PlaceController
com.threerings.parlor.game.client.GameController
com.threerings.parlor.card.client.CardGameController
public abstract class CardGameController
A controller class for card games. Handles common functions like accepting dealt hands.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.crowd.client.PlaceController |
|---|
com.threerings.crowd.client.PlaceController.DelegateOp |
| Nested classes/interfaces inherited from interface com.threerings.presents.client.InvocationReceiver |
|---|
com.threerings.presents.client.InvocationReceiver.Registration |
| Field Summary |
|---|
| Fields inherited from class com.samskivert.swing.Controller |
|---|
DISPATCHER |
| Fields inherited from interface com.threerings.parlor.card.data.CardCodes |
|---|
ACE, BLACK_JOKER, CLUBS, DIAMONDS, HEARTS, JACK, KING, QUEEN, RED_JOKER, SPADES |
| Fields inherited from interface com.threerings.presents.data.InvocationCodes |
|---|
ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR |
| Constructor Summary | |
|---|---|
CardGameController()
|
|
| Method Summary | |
|---|---|
void |
cardsTransferredBetweenPlayers(int fromidx,
int toidx,
int cards)
Dispatched to the client when a set of cards is transferred between two other players in the game. |
void |
didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
Removes our listener registration from the game object and cleans house. |
void |
receivedCardsFromPlayer(int plidx,
Card[] cards)
Dispatched to the client when it has received a set of cards from another player. |
void |
receivedHand(Hand hand)
Called when the server deals the client a new hand of cards. |
void |
receivedHand(int oid,
Hand hand)
Called by our sender to notify us of a received hand. |
void |
sentCardsToPlayer(int plidx,
Card[] cards)
Dispatched to the client when the server has forced it to send a set of cards to another player. |
void |
turnDidChange(com.threerings.util.Name turnHolder)
Called when the turn changed. |
void |
willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
Adds this controller as a listener to the game object (thus derived classes need not do so) and lets the game manager know that we are now ready to go. |
| Methods inherited from class com.threerings.parlor.game.client.GameController |
|---|
attributeChanged, getMatchType, getSessionId, handleAction, init, isGameOver, resetGame, setGameOver, systemMessage |
| Methods inherited from class com.threerings.crowd.client.PlaceController |
|---|
getPlaceConfig, getPlaceView, mayLeavePlace |
| Methods inherited from class com.samskivert.swing.Controller |
|---|
actionPerformed, configureAction, createActionButton, handleAction, handleAction, handleAction, postAction, postAction, postAction, setControlledPanel, wasAdded, wasRemoved |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CardGameController()
| Method Detail |
|---|
public void willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
GameController
willEnterPlace in class GameControllerpublic void didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
GameController
didLeavePlace in class GameControllerpublic void turnDidChange(com.threerings.util.Name turnHolder)
TurnGameController
turnDidChange in interface TurnGameControllerturnHolder - the username of the new holder of the turn.
public final void receivedHand(int oid,
Hand hand)
receivedHand in interface CardGameReceiveroid - the oid of the game for which this hand applieshand - the received handpublic void receivedHand(Hand hand)
hand - the hand dealt to the user
public void receivedCardsFromPlayer(int plidx,
Card[] cards)
receivedCardsFromPlayer in interface CardGameReceiverplidx - the index of the player providing the cardscards - the cards received
public void sentCardsToPlayer(int plidx,
Card[] cards)
sentCardsToPlayer in interface CardGameReceiverplidx - the index of the player to which the cards were sentcards - the cards sent
public void cardsTransferredBetweenPlayers(int fromidx,
int toidx,
int cards)
cardsTransferredBetweenPlayers in interface CardGameReceiverfromidx - the index of the player sending the cardstoidx - the index of the player receiving the cardscards - the number of cards transferred
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||