|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectglassfrog.model.Gamedef
public class Gamedef
A class used to define all of the properties of the game. The properties can either be specified through getters and setters, a constructor or parsed in via an XML file
Field Summary | |
---|---|
private int[] |
betsPerRound
|
private int[] |
betStructure
|
private int[] |
blindStructure
|
private boolean |
doylesGame
|
private int |
maxBet
|
private int |
maxPlayers
|
private int |
minBet
|
private int |
minPlayers
|
private boolean |
noLimit
|
private int[] |
numPrivateCards
|
private int[] |
numPublicCards
|
private int |
numRounds
|
private boolean |
reverseBlinds
|
private static long |
serialVersionUID
|
private int |
smallBlind
|
private int |
stackSize
|
Constructor Summary | |
---|---|
Gamedef()
Default contructor. |
|
Gamedef(java.lang.String path)
A contructor for a gamedef that takes a path to an XML file that represents that gamedef |
Method Summary | |
---|---|
int |
getBet(int index)
Get the raise value associated with the round. |
int[] |
getBetsPerRound()
Return an array representing the number of bets allowed in a round. |
int[] |
getBetStructure()
Get the betting structure for the game. |
int |
getBlind(int index)
Get the blind / ante associated with the index using the blind structure and the small blind value. |
int[] |
getBlindStructure()
The Blind structure is an array that represents what players must pay an ante or blind. |
int |
getMaxBet()
Return the maximum bet size of the game. |
int |
getMaxPlayers()
Get the maximum amount of players alloed to play in this game |
int |
getMinBet()
Get the minimum bet for the game |
int |
getMinPlayers()
Get the minimum amount of players allowed to play in this game |
int[] |
getNumPrivateCards()
Get the number of private cards each player is dealt. |
int[] |
getNumPublicCards()
Get the number of puyblic cards dealt each round. |
int |
getNumRounds()
Get the number of rounds to be played each hand. |
int |
getSmallBlind()
Get the size of the small blind. |
int |
getStackSize()
Get the starting stack size assiged to the players if using set stack sizes as in Doyles Game |
boolean |
isDoylesGame()
Check to see whether or not this game is Doyles Game, a game where we reset the stack size after every hand and keep a score instead of overall stack achievement |
boolean |
isNoLimit()
Check to see if this is a no limit betting game |
boolean |
isReverseBlinds()
Check to see whether or not reverse blinds is in effect. |
private java.lang.String |
printArray(int[] array)
A helper function to print an int array to a string, comma delimited |
void |
setBetsPerRound(int[] betsPerRound)
Set the number of bets allowed per round. |
void |
setBetStructure(int[] betStructure)
Set the betting structure for the game. |
void |
setBlindStructure(int[] blindStructure)
Set up the blind structure. |
void |
setDoylesGame(boolean doylesGame)
Set whether or not this game is Doyles Game, a game where we reset the stack size after every hand and keep a score instead of overall stack achievement |
void |
setMaxBet(int maxBet)
Set the max bet a player is allowed to make in the game. |
void |
setMaxPlayers(int maxPlayers)
Set the maximum amount of players allowed in the game |
void |
setMinBet(int minBet)
Set the minimum bet for the game |
void |
setMinPlayers(int minPlayers)
Set the minimum amount of players allowed in the game |
void |
setNoLimit(boolean noLimit)
Set whether or not this is a no limit betting game |
void |
setNumPrivateCards(int[] numPrivateCards)
Set the number of private cards each player is dealt. |
void |
setNumPublicCards(int[] numPublicCards)
Set the number of puyblic cards dealt each round. |
void |
setNumRounds(int numRounds)
Set the number of rounds to be played each hand. |
void |
setReverseBlinds(boolean reverseBlinds)
Set whether or not reverse blinds is in effect. |
void |
setSmallBlind(int smallBlind)
Set the size of the small blind. |
void |
setStackSize(int stackSize)
Set the starting stack size value for each player if using set stack sizes as in Doyles Game |
java.lang.String |
toString()
Get the gamedef as a String; |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private int numRounds
private int maxPlayers
private int minPlayers
private int minBet
private int maxBet
private int stackSize
private int smallBlind
private int[] blindStructure
private int[] numPrivateCards
private int[] numPublicCards
private int[] betsPerRound
private int[] betStructure
private boolean reverseBlinds
private boolean doylesGame
private boolean noLimit
Constructor Detail |
---|
public Gamedef()
public Gamedef(java.lang.String path) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXParseException, org.xml.sax.SAXException, java.io.IOException
path
- The path to the gamedef XML file
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXParseException
org.xml.sax.SAXException
java.io.IOException
Method Detail |
---|
public int[] getBlindStructure()
public void setBlindStructure(int[] blindStructure)
blindStructure
- an array representing the blinds or antespublic int[] getBetsPerRound()
public void setBetsPerRound(int[] betsPerRound)
betsPerRound
- an array representing the bets per roundpublic int[] getBetStructure()
public void setBetStructure(int[] betStructure)
betStructure
- an array representing the bet structure of the gamepublic int getMaxBet()
public void setMaxBet(int maxBet)
maxBet
- an int representing the max bet a player is allowed to makepublic int getMaxPlayers()
public void setMaxPlayers(int maxPlayers)
maxPlayers
- an int representing the the maximum amount of playerspublic int getMinPlayers()
public void setMinPlayers(int minPlayers)
minPlayers
- an int representing the the minimum amount of playerspublic boolean isDoylesGame()
public void setDoylesGame(boolean doylesGame)
doylesGame
- True for Doyles Game, False otherwisepublic int getMinBet()
public void setMinBet(int minBet)
minBet
- an int representing the minimum bet size for the gamepublic boolean isNoLimit()
public void setNoLimit(boolean noLimit)
noLimit
- True for no limit, false otherwisepublic int[] getNumPrivateCards()
public void setNumPrivateCards(int[] numPrivateCards)
numPrivateCards
- an array of ints representing the cards dealt to the players.public int[] getNumPublicCards()
public void setNumPublicCards(int[] numPublicCards)
numPublicCards
- an array of ints representing the cards dealt each round.public int getNumRounds()
public void setNumRounds(int numRounds)
numRounds
- an int representing the number of rounds to be played each handpublic boolean isReverseBlinds()
public void setReverseBlinds(boolean reverseBlinds)
reverseBlinds
- a boolean used to set the reverseBlinds flagpublic int getSmallBlind()
public void setSmallBlind(int smallBlind)
smallBlind
- an int representing the value of the small blindpublic int getStackSize()
public void setStackSize(int stackSize)
stackSize
- an int representing the starting stack size for the playerspublic int getBlind(int index)
index
- The index from which to return the blind value
public int getBet(int index)
index
- The index from which to return the bet value
public java.lang.String toString()
toString
in class java.lang.Object
private java.lang.String printArray(int[] array)
array
- an int array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |