|
||||||||||
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(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 |
Context |
getActionContext()
Get the context of the last action made by this player. |
int |
getAmountCallable()
|
int |
getAmountInPot()
Obtain the amount the player has put in the pot. |
int |
getAmountInPotThisRound()
Obtain the amount the player has put in the pot.this round |
int |
getAmountRaiseable()
|
int |
getAmountToCall()
Determine the amount a player must pay to stay in the game |
int |
getAmountToCall(int amount_needed)
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 |
int |
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()
Get our position ID in the GameInfo |
Hand |
getRevealedHand()
Obtain the hand revealed by this player |
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 |
Context |
makeContext(int action,
double bets)
Log a context file (used to train neural nets for opponent move precition, etc...) |
void |
muck()
|
double |
potOdds()
Obtain the player's pot odds |
double |
potRatio()
The ratio of the money in the pot that belongs to the player |
void |
resetBankRoll()
|
void |
returnChips(int amount)
replace the chips in the players stack |
void |
revealHand(Card c1,
Card c2)
Reveal the hole cards in a showdown |
void |
save()
|
void |
setBankRoll(int br)
|
void |
setBankRollAndSave(int 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 inMethod Detail |
---|
public void save()
public double getNetGain()
public void setBankRollAndSave(int br)
public void setBankRoll(int br)
public void resetBankRoll()
public double getBankRoll()
public double getBankRollInSmallBets()
public boolean inGame()
public void setInGame(boolean value)
public int getPosition()
public void startNewGame()
public java.lang.String getName()
public boolean allIn()
public void muck()
public void win(double amount)
amount
- the amount of money to givepublic void revealHand(Card c1, Card c2)
c1
- the first cardc2
- the second cardpublic Hand getRevealedHand()
public int getAmountToCall(int amount_needed)
amount_needed
- the total amount the player should have in the pot
public int getAmountToCall()
public boolean isCommitted()
public boolean hasActedThisRound()
public double potOdds()
public int getLastAmountCalled()
public double getLastBetsToCall()
public int getAmountInPot()
public int getAmountInPotThisRound()
public Context makeContext(int action, double bets)
public double potRatio()
public int getLastActionCode()
public int getLastAction()
public Context getActionContext()
public GameInfo getGameInfo()
public boolean active()
public boolean isButton()
public boolean hasEnoughToCall()
public boolean hasEnoughToRaise()
public int getAmountRaiseable()
public int getAmountCallable()
public java.lang.String toString()
toString
in class java.lang.Object
public double getMaximumRisk()
public void returnChips(int amount)
amount
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |