|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpoker.PlayerInfo
public class PlayerInfo
Stores all of the information for a player during a poker game. Also contains references to a player's past history of games. This class is a little messy from evolution, and has some ugly hooks for the AI system.
Constructor Summary | |
---|---|
PlayerInfo(PlayerInfo pi,
GameInfo gi)
Copy constructor |
|
PlayerInfo(java.lang.String playerName,
GameInfo gi)
Constructor. |
Method Summary | |
---|---|
boolean |
active()
Return true if the player is still active in the hand |
boolean |
allIn()
Determine if a player is All-In |
double |
getAmountCallable()
|
double |
getAmountInPot()
Obtain the amount the player has put in the pot. |
double |
getAmountInPotThisRound()
Obtain the amount the player has put in the pot.this round |
double |
getAmountRaiseable()
|
double |
getAmountToCall()
Determine the amount a player must pay to stay in the game |
double |
getBankRoll()
|
double |
getBankRollInSmallBets()
|
GameInfo |
getGameInfo()
Get the context of the last action made by this player. |
int |
getLastAction()
A single integer code for the last action made |
int |
getLastActionCode()
A single integer code for the last action made |
double |
getLastAmountCalled()
Get the amount called by this player during his last action |
double |
getLastBetsToCall()
Obtain the amount of bets the player had to call during their last action. |
double |
getMaximumRisk()
The maximum we can risk in the hand. |
java.lang.String |
getName()
obtain the player's name |
double |
getNetGain()
|
int |
getPosition()
Deprecated. use getSeat() instead |
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 our seat number in the GameInfo |
boolean |
hasActedThisRound()
Check if a player has made at least one action this round |
boolean |
hasEnoughToCall()
|
boolean |
hasEnoughToRaise()
|
boolean |
inGame()
|
boolean |
isButton()
|
boolean |
isCommitted()
Test if a player has volunatrily committed yet in this round |
double |
potOdds()
Obtain the player's immediate pot odds |
double |
potRatio()
The ratio of the money in the pot that belongs to the player |
void |
resetBankRoll()
|
void |
save()
|
void |
setBankRoll(double br)
|
void |
setBankRollAndSave(double br)
|
void |
setInGame(boolean value)
|
void |
startNewGame()
Start a new game with this player |
java.lang.String |
toString()
|
void |
win(double amount)
Give the player some money |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PlayerInfo(java.lang.String playerName, GameInfo gi)
playerName
- the name of the playergi
- the game that the player is inpublic PlayerInfo(PlayerInfo pi, GameInfo gi)
pi
- the PlayerInfo to deep copygi
- the new GameInfo to referenceMethod Detail |
---|
public void save()
public double getNetGain()
public void setBankRollAndSave(double br)
public void setBankRoll(double br)
public void resetBankRoll()
public double getBankRoll()
public double getBankRollInSmallBets()
public boolean inGame()
public void setInGame(boolean value)
public int getPosition()
public int getSeat()
public void startNewGame()
public java.lang.String getName()
public boolean allIn()
public void win(double amount)
amount
- the amount of money to givepublic Hand getRevealedHand()
public double getAmountToCall()
public boolean isCommitted()
public boolean hasActedThisRound()
public double potOdds()
public double getLastAmountCalled()
public double getLastBetsToCall()
public double getAmountInPot()
public double getAmountInPotThisRound()
public double potRatio()
public int getLastActionCode()
public int getLastAction()
public GameInfo getGameInfo()
public boolean active()
public boolean isButton()
public boolean hasEnoughToCall()
public boolean hasEnoughToRaise()
public double getAmountRaiseable()
public double getAmountCallable()
public java.lang.String toString()
toString
in class java.lang.Object
public double getMaximumRisk()
public double getRaiseAmount(double amountToRaise)
amountToRaise
- the desired amount to raise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |