|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.ualberta.cs.poker.free.dynamics.PokerDynamics
ca.ualberta.cs.poker.free.client.ClientPokerDynamics
public class ClientPokerDynamics
Maintains a version of the server's state on the client side. Keeps track of bankroll, seat, and the state of the match in a usable form.
Field Summary | |
---|---|
double |
bankroll
The bankroll at the beginning of the hand when (handOver==false): when (handOver==true), it becomes the bankroll at the end of the hand. |
int |
seatTaken
The seat taken by this player. |
Fields inherited from class ca.ualberta.cs.poker.free.dynamics.PokerDynamics |
---|
amountWon, bettingSequence, board, firstActionOnRound, handNumber, handOver, hole, inPot, roundBets, roundIndex, seatToAct, winnerIndex |
Constructor Summary | |
---|---|
ClientPokerDynamics()
Creates a new instance of ClientPokerDynamics |
Method Summary | |
---|---|
Card |
getCard(java.lang.String cardSequence,
int currentIndex)
Get a card from the card sequence. |
java.lang.String |
getRoundBettingSequence()
Returns the betting sequence since the last cards observed. |
boolean |
isOurTurn()
Returns true if it is our turn to act. |
void |
setBettingString(java.lang.String bettingString)
Initialize the betting string. |
void |
setCards(java.lang.String cardSequence)
Initialize all the cards from the card sequence. |
void |
setFromMatchStateMessage(java.lang.String message)
Initialize this from a match state message. |
void |
updateBankroll()
Update the bankroll: note that this is ONLY changed at the end of a hand. |
Methods inherited from class ca.ualberta.cs.poker.free.dynamics.PokerDynamics |
---|
addToPot, dealCards, endHand, getCardState, getMatchState, getOtherSeat, getWinner, handleAction, handleCall, handleFold, handleRaise, incrementRound, initializeBets, isFirstSeatVisible, isSecondSeatVisible, setHandNumber, startHand, startHand |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int seatTaken
public double bankroll
Constructor Detail |
---|
public ClientPokerDynamics()
Method Detail |
---|
public boolean isOurTurn()
public void setFromMatchStateMessage(java.lang.String message)
public void setBettingString(java.lang.String bettingString)
public Card getCard(java.lang.String cardSequence, int currentIndex)
public void setCards(java.lang.String cardSequence)
public java.lang.String getRoundBettingSequence()
public void updateBankroll()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |