|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgame.State
public class State
Contains all information about the current state of the game with all necessary information available for the player.
Field Summary | |
---|---|
private int |
button
|
private boolean |
buttonClockwise
|
private int |
currentHand
|
private int |
currentPlayer
|
private int |
currentRound
|
private Gamedef |
gamedef
|
private Player[] |
players
|
private Round[] |
rounds
|
Constructor Summary | |
---|---|
State(Gamedef gamedef)
|
Method Summary | |
---|---|
Action |
addAction(int round,
char actionChar)
|
Action |
addAction(int round,
char actionChar,
int totalInPot)
|
private Action |
generateAction(int currentRound,
char actionChar,
int player)
|
Player[] |
getActivePlayers()
Returns all remaining active players. |
int |
getAnte()
|
int[] |
getBetStructure()
|
int |
getBigBlind()
|
int[] |
getBlindPoster()
|
int[] |
getBlindStructure()
|
Card[] |
getBoardCards()
|
int |
getButton()
|
int |
getBuyin()
|
int[] |
getCashDeltas()
|
int |
getCurrentRound()
|
Card[] |
getDeadCards()
|
int |
getGamedefsMinPlayers()
|
int |
getHighestBet()
|
java.lang.String |
getHistory(int round)
Returns the bet history of the given round as a string. |
int |
getLimit()
|
int |
getMaxBet()
|
int |
getMinBet()
|
int |
getNextActivePlayer()
|
int |
getNextActivePlayer(int position)
|
int |
getPlayerByName(java.lang.String string)
|
Player[] |
getPlayers()
Returns the players as an array. |
int[] |
getPositions()
|
int |
getPotSize()
|
private int |
getPreviousActivePlayer(int position)
|
int[] |
getRankings()
|
Round |
getRound()
|
Round |
getRound(int n)
|
int |
getSmallBlind()
|
int |
getStyle()
Returns an integer representing the game style. |
private void |
initBoardCards()
Prepares the storage of the board cards. |
boolean |
isCheckable()
Returns if the bot has the option to check. |
private boolean |
isDoylesGame()
Checks if the game is a "Doyle's game". |
boolean |
isMyMove()
Checks if it is the bot's turn. |
private boolean |
isTournament()
|
void |
newHand()
|
void |
newRound()
|
void |
printState()
|
void |
reorderPlayers(int ownIndex)
Changes the players array to an order in which the own index is 0, the player next to one self 1 and so on. |
void |
reset()
Resets the player states and board cards for the beginning of a new hand. |
private void |
setBlind(int player,
int size)
|
void |
setBoardCards(int round,
Card[] cards)
Stores the revealed board cards of the given round. |
void |
setCurrentPlayer(int player)
Sets the current player to the given index. |
int[][] |
setGetBlinds()
|
void |
setHand(int ownPosition,
int hand)
Sets the hand counter to the given and updates the position of the players. |
void |
setHoleCards(Card[][] holeCards)
|
void |
setHoleCards(int player,
Card[] cards)
|
void |
setNextActivePlayer()
|
void |
setPlayers(java.lang.String[] names,
int[] buyins)
Stores names & buyins of the players. |
void |
showdown(int[] winsPerPlayer)
|
void |
updatePlayerPositions()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Gamedef gamedef
private int currentHand
private Player[] players
private int button
private int currentPlayer
private Round[] rounds
private boolean buttonClockwise
private int currentRound
Constructor Detail |
---|
public State(Gamedef gamedef)
Method Detail |
---|
private void initBoardCards()
public void setPlayers(java.lang.String[] names, int[] buyins)
names
- all names of the playersbuyins
- buy ins of the playerspublic void updatePlayerPositions()
private Action generateAction(int currentRound, char actionChar, int player)
public int getHighestBet()
public int getPotSize()
public int[][] setGetBlinds()
private void setBlind(int player, int size)
public void setNextActivePlayer()
public int getNextActivePlayer()
public int getNextActivePlayer(int position)
private int getPreviousActivePlayer(int position)
public void setHoleCards(int player, Card[] cards)
public void setHoleCards(Card[][] holeCards)
public void setBoardCards(int round, Card[] cards)
round
- Round in which given cards are revealedcards
- Revealed cardspublic Player[] getPlayers()
public Player[] getActivePlayers()
public java.lang.String getHistory(int round)
round
- Round of the bet history
public boolean isCheckable()
public boolean isMyMove()
public void setCurrentPlayer(int player)
player
- Index of the who should be the current playerpublic void setHand(int ownPosition, int hand)
ownPosition
- The own position in this handhand
- The number hand of the current hand.public void reorderPlayers(int ownIndex)
ownIndex
- Index of the own player before the orderingpublic void reset()
public void printState()
public void showdown(int[] winsPerPlayer)
private boolean isDoylesGame()
public int getStyle()
private boolean isTournament()
public int getLimit()
public int[] getPositions()
public Action addAction(int round, char actionChar)
public Action addAction(int round, char actionChar, int totalInPot)
public void newRound()
public void newHand()
public int getMinBet()
public int getMaxBet()
public int getBuyin()
public int getSmallBlind()
public int getBigBlind()
public int getAnte()
public Round getRound()
public Round getRound(int n)
public int getCurrentRound()
public int[] getCashDeltas()
public int[] getRankings()
public int[] getBetStructure()
public int[] getBlindStructure()
public int getButton()
public int[] getBlindPoster()
public int getGamedefsMinPlayers()
public Card[] getBoardCards()
public Card[] getDeadCards()
public int getPlayerByName(java.lang.String string)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |