public interface TrickCardGameObject extends TurnGameObject
| Modifier and Type | Field and Description |
|---|---|
static int |
ACCEPTS_REMATCH
Indicates that the player has accepted the rematch request.
|
static int |
BETWEEN_HANDS
The state that indicates the game is currently between hands.
|
static int |
NO_REQUEST
Indicates that the player has not requested or accepted a rematch.
|
static int |
PLAYING_HAND
The state that indicates the game is currently playing a hand.
|
static int |
PLAYING_TRICK
The state that indicates the game is currently playing a trick.
|
static int |
REQUESTS_REMATCH
Indicates that the player has requested a rematch.
|
static int |
TRICK_STATE_COUNT
The number of states defined for the base trick card game object.
|
TURN_HOLDER_REPLACED| Modifier and Type | Method and Description |
|---|---|
PlayerCard[] |
getCardsPlayed()
Returns an array containing the history of the trick in terms of the
cards played by each player.
|
String |
getCardsPlayedFieldName()
Returns the name of the field that contains the history of the trick
in terms of the cards played by each player.
|
PlayerCard[] |
getLastCardsPlayed()
Returns an array containing the history of the last trick in terms of
the cards played by each player.
|
String |
getLastCardsPlayedFieldName()
Returns the name of the field that contains the history of the last
trick in terms of the cards played by each player.
|
int[] |
getRematchRequests()
Returns the array of rematch requests.
|
String |
getRematchRequestsFieldName()
Returns the name of the field that contains the rematch requests.
|
TrickCardGameMarshaller |
getTrickCardGameService()
Returns a reference to the trick card game service used to make
requests to the server.
|
int |
getTrickState()
Returns the trick state: between hands, playing a hand, or playing a
trick.
|
String |
getTrickStateFieldName()
Returns the name of the field that contains the trick state: between
hands, playing a hand, or playing a trick.
|
PlayerCard |
getTrickTaker()
Returns the card of the player who took the current trick.
|
long |
getTurnDuration()
Returns the duration of the current turn, which may depend on the state
of the game as well as the duration scale of the active player.
|
float[] |
getTurnDurationScales()
Returns an array containing the turn duration scales for each player.
|
boolean |
isCardPlayable(Hand hand,
Card card)
Checks whether a user can play the specified card at this time.
|
void |
setCardsPlayed(PlayerCard[] cardsPlayed)
Sets the array of cards played by each player.
|
void |
setLastCardsPlayed(PlayerCard[] lastCardsPlayed)
Sets the last array of cards played by each player.
|
void |
setRematchRequests(int[] rematchRequests)
Sets the array of rematch requests.
|
void |
setRematchRequestsAt(int rematchRequest,
int index)
Sets an element of the rematch request array.
|
void |
setTrickCardGameService(TrickCardGameMarshaller trickCardGameService)
Sets the reference to the trick card game service.
|
void |
setTrickState(int trickState)
Sets the trick state.
|
void |
setTurnDurationScales(float[] turnDurationScales)
Sets the array of turn duration scales.
|
void |
setTurnDurationScalesAt(float turnDurationScale,
int index)
Sets an element of the array of turn duration scales.
|
getPlayers, getTurnHolder, getTurnHolderFieldName, isInPlay, setTurnHolderstatic final int BETWEEN_HANDS
static final int PLAYING_HAND
static final int PLAYING_TRICK
static final int TRICK_STATE_COUNT
static final int NO_REQUEST
static final int REQUESTS_REMATCH
static final int ACCEPTS_REMATCH
TrickCardGameMarshaller getTrickCardGameService()
void setTrickCardGameService(TrickCardGameMarshaller trickCardGameService)
trickCardGameService - the trick card game serviceString getTrickStateFieldName()
int getTrickState()
void setTrickState(int trickState)
trickState - the trick statefloat[] getTurnDurationScales()
void setTurnDurationScales(float[] turnDurationScales)
turnDurationScales - the array of turn duration scalesvoid setTurnDurationScalesAt(float turnDurationScale,
int index)
turnDurationScale - the turn duration scaleindex - the index of the turn duration scalelong getTurnDuration()
String getCardsPlayedFieldName()
PlayerCard[] getCardsPlayed()
void setCardsPlayed(PlayerCard[] cardsPlayed)
cardsPlayed - the array of cards playedString getLastCardsPlayedFieldName()
PlayerCard[] getLastCardsPlayed()
void setLastCardsPlayed(PlayerCard[] lastCardsPlayed)
lastCardsPlayed - the last array of cards playedString getRematchRequestsFieldName()
int[] getRematchRequests()
void setRematchRequests(int[] rematchRequests)
rematchRequests - the array of rematch requestsvoid setRematchRequestsAt(int rematchRequest,
int index)
rematchRequest - the rematch request valueindex - the index at which to set the valueboolean isCardPlayable(Hand hand, Card card)
hand - the player's handcard - the card that the user would like to playPlayerCard getTrickTaker()
Copyright © 2015. All rights reserved.