ca.ualberta.cs.poker.free.academy25
Class PlayerInfoDynamics

java.lang.Object
  extended by ca.ualberta.cs.poker.free.academy25.PlayerInfoDynamics

public class PlayerInfoDynamics
extends java.lang.Object


Constructor Summary
PlayerInfoDynamics(GameInfoDynamics dynamics, GameInfoImpl parent, int playerIndex)
          Creates a new instance of PlayerInfoDynamics
 
Method Summary
 double getAmountCallable()
          Gets the amount to call
 double getAmountInPot()
          Gets the amount in pot.
 double getAmountInPotThisRound()
          This gets the amount in pot for the current player during the current round of betting.
 double getAmountRaiseable()
          Gets the current bet size (getCurrentBetSize()).
 double getAmountToCall()
          The amount to call (difference between the stakes and this player's pot).
 double getBankRoll()
          The bankroll of this player.
 double getBankRollAtRisk()
          The bankroll at risk.
 double getBankRollAtStartOfHand()
          The bankroll at the start of the current hand.
 double getBankRollInSmallBets()
          Returns the bankroll of this player in small bets.
 GameInfo getGameInfo()
          Returns the associated GameInfo object
 int getLastAction()
          Returns the last action this player played in this hand, or -1 if no such action exists.
 java.lang.String getName()
          Returns "0" or "1"
 double getNetGain()
          Gets the net gain for the hand.
 double getRaiseAmount(double amountToRaise)
          Returns the current bet size.
 Hand getRevealedHand()
           
 int getSeat()
           
 boolean hasActedThisRound()
           
 boolean hasEnoughToRaise()
          Always true (infinite bankrolls).
 boolean inGame()
          Players are always in the game.
 boolean isActive()
          A player is active until they fold or lose a showdown.
 boolean isAllIn()
          Players are never all in
 boolean isButton()
          Returns true if this player is the button
 boolean isCommitted()
          Test for a voluntary commitment by the player.
 boolean isFolded()
          A player has folded if his last action was fold.
 boolean isSittingOut()
          Players never sit out.
 java.lang.String toString()
          Returns the name, "0" or "1"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlayerInfoDynamics

public PlayerInfoDynamics(GameInfoDynamics dynamics,
                          GameInfoImpl parent,
                          int playerIndex)
Creates a new instance of PlayerInfoDynamics

Parameters:
dynamics - the underlying dynamics object
parent - the associated GameInfo object
playerIndex - the seat of this player
Method Detail

getAmountCallable

public double getAmountCallable()
Gets the amount to call


getAmountInPot

public double getAmountInPot()
Gets the amount in pot. Nonzero even when the game is over.


getAmountInPotThisRound

public double getAmountInPotThisRound()
This gets the amount in pot for the current player during the current round of betting.


getAmountRaiseable

public double getAmountRaiseable()
Gets the current bet size (getCurrentBetSize()).


getAmountToCall

public double getAmountToCall()
The amount to call (difference between the stakes and this player's pot).


getBankRoll

public double getBankRoll()
The bankroll of this player.


getBankRollAtRisk

public double getBankRollAtRisk()
The bankroll at risk. This function was designed for no-limit games, so its results in this context are a bit funny.


getBankRollAtStartOfHand

public double getBankRollAtStartOfHand()
The bankroll at the start of the current hand.


getBankRollInSmallBets

public double getBankRollInSmallBets()
Returns the bankroll of this player in small bets. Returns getBankRoll()/getGameInfo().getBigBlindSize()


getGameInfo

public GameInfo getGameInfo()
Returns the associated GameInfo object


getLastAction

public int getLastAction()
Returns the last action this player played in this hand, or -1 if no such action exists.


getName

public java.lang.String getName()
Returns "0" or "1"


getNetGain

public double getNetGain()
Gets the net gain for the hand. Returns zero if the game is over.


getRaiseAmount

public double getRaiseAmount(double amountToRaise)
Returns the current bet size.


getRevealedHand

public Hand getRevealedHand()

getSeat

public int getSeat()

hasActedThisRound

public boolean hasActedThisRound()

hasEnoughToRaise

public boolean hasEnoughToRaise()
Always true (infinite bankrolls).


inGame

public boolean inGame()
Players are always in the game.


isActive

public boolean isActive()
A player is active until they fold or lose a showdown.


isAllIn

public boolean isAllIn()
Players are never all in


isButton

public boolean isButton()
Returns true if this player is the button


isCommitted

public boolean isCommitted()
Test for a voluntary commitment by the player.


isFolded

public boolean isFolded()
A player has folded if his last action was fold.


isSittingOut

public boolean isSittingOut()
Players never sit out.


toString

public java.lang.String toString()
Returns the name, "0" or "1"

Overrides:
toString in class java.lang.Object