com.biotools.meerkat
Interface PlayerInfo


public interface PlayerInfo

All of the public state information for a player in the current hand


Method Summary
 double getAmountCallable()
          get the amount of the current bet that the player can call
 double getAmountInPot()
          Obtain the amount the player has invested in the pot.
 double getAmountInPotThisRound()
          Obtain the amount the player has invested in the pot this round
 double getAmountRaiseable()
          Get the maximum amount the player can raise
 double getAmountToCall()
          Determine the amount a player must pay to stay in the game
 double getBankRoll()
          Get the current bankroll
 double getBankRollAtRisk()
          The maximum we can risk in the hand.
 double getBankRollAtStartOfHand()
          Get the player's bankroll at the start of the hand (i.e., before any actions including antes and blinds).
 double getBankRollInSmallBets()
          Get the current bankroll as a multiple of the big blind
 GameInfo getGameInfo()
          Get the context of the last action made by this player.
 int getLastAction()
          A single integer code for the last action made
 java.lang.String getName()
          Obtain the player's name
 double getNetGain()
          Get the net amount won or lost since the start of the current hand
 double getRaiseAmount(double amountToRaise)
          Return the amount the player can raise, given the desired amount to raise.
 Hand getRevealedHand()
          Obtain the hand revealed by this player
 int getSeat()
          Get the player's seat number in the GameInfo
 boolean hasActedThisRound()
          Check if a player has made at least one action this round
 boolean hasEnoughToRaise()
          Check if the player has enough chips to complete a raise
 boolean inGame()
          See if the player is dealt into the current game
 boolean isActive()
          Return true if the player is still active in the hand
 boolean isAllIn()
          Determine if a player is All-In
 boolean isButton()
          Check if the player is currently the button
 boolean isCommitted()
          Test if a player has volunatrily committed yet in this round
 boolean isFolded()
          Return true if the player has folded
 boolean isSittingOut()
          Determine if a player is sitting out
 java.lang.String toString()
           
 

Method Detail

getNetGain

double getNetGain()
Get the net amount won or lost since the start of the current hand

Returns:
the net amount won or lost since the start of the current hand

getBankRoll

double getBankRoll()
Get the current bankroll

Returns:
the current bankroll

getBankRollAtStartOfHand

double getBankRollAtStartOfHand()
Get the player's bankroll at the start of the hand (i.e., before any actions including antes and blinds).

Returns:
the player's bankroll at the start of the hand.

getBankRollInSmallBets

double getBankRollInSmallBets()
Get the current bankroll as a multiple of the big blind

Returns:
the current bankroll as a multiple of the big blind

inGame

boolean inGame()
See if the player is dealt into the current game

Returns:
true if the player is dealt into the current game

getSeat

int getSeat()
Get the player's seat number in the GameInfo

Returns:
the player's seat number in the GameInfo

getName

java.lang.String getName()
Obtain the player's name

Returns:
the name of this player

isAllIn

boolean isAllIn()
Determine if a player is All-In

Returns:
true if all in, false otherwise

isSittingOut

boolean isSittingOut()
Determine if a player is sitting out

Returns:
true if sitting out, false otherwise

getRevealedHand

Hand getRevealedHand()
Obtain the hand revealed by this player

Returns:
the player's hand, or null if unrevealed

getAmountToCall

double getAmountToCall()
Determine the amount a player must pay to stay in the game

Returns:
the amount needed to stay in.

isCommitted

boolean isCommitted()
Test if a player has volunatrily committed yet in this round

Returns:
true if player is committed, false if not.

hasActedThisRound

boolean hasActedThisRound()
Check if a player has made at least one action this round

Returns:
true if player has acted in this round

getAmountInPot

double getAmountInPot()
Obtain the amount the player has invested in the pot.

Returns:
the amount the player has invested in the pot.

getAmountInPotThisRound

double getAmountInPotThisRound()
Obtain the amount the player has invested in the pot this round

Returns:
the amount the player has invested in the pot this round

getLastAction

int getLastAction()
A single integer code for the last action made

Returns:
one of [Holdem.FOLD, Holdem.CALL, Holdem.RAISE]

getGameInfo

GameInfo getGameInfo()
Get the context of the last action made by this player.


isActive

boolean isActive()
Return true if the player is still active in the hand

Returns:
true if the player is still active

isFolded

boolean isFolded()
Return true if the player has folded

Returns:
true if the player has folded

isButton

boolean isButton()
Check if the player is currently the button

Returns:
true if the player is currently the button

hasEnoughToRaise

boolean hasEnoughToRaise()
Check if the player has enough chips to complete a raise

Returns:
true if the player has enough money to raise

getAmountRaiseable

double getAmountRaiseable()
Get the maximum amount the player can raise

Returns:
the maximum amount the player can raise

getAmountCallable

double getAmountCallable()
get the amount of the current bet that the player can call

Returns:
the amount the player can call

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the PlayerInfo

getBankRollAtRisk

double getBankRollAtRisk()
The maximum we can risk in the hand. If we have all active players covered, then we can't lose more than the biggest bankroll. Otherwise, we can lose our entire bankroll.

Returns:
the maximum we can risk in the hand

getRaiseAmount

double getRaiseAmount(double amountToRaise)
Return the amount the player can raise, given the desired amount to raise. Ensures a player can't raise more than they have.

Parameters:
amountToRaise - the desired amount to raise.
Returns:
the actual amount the player can raise