Package javatro.core
Class Ante
java.lang.Object
javatro.core.Ante
The
Ante class represents the ante system in a poker game, managing the current round,
ante values, and blind progression.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing different blind levels with associated multipliers and names. -
Constructor Summary
ConstructorsConstructorDescriptionAnte()Constructs anAnteobject with an initial ante count of 1 and the small blind level. -
Method Summary
Modifier and TypeMethodDescriptionintGets the current ante count.intGets the base ante score for the current round.getBlind()Gets the current blind level.intCalculates the round score based on the ante level and blind multiplier.voidMoves to the next round of the ante system, adjusting the blind level and ante count.voidResets the ante to the first round with the small blind.voidsetAnteCount(int anteCount) Sets the ante count for the game.voidsetBlind(Ante.Blind blind) Sets the blind level manually.
-
Constructor Details
-
Ante
public Ante()Constructs anAnteobject with an initial ante count of 1 and the small blind level.
-
-
Method Details
-
getRoundScore
public int getRoundScore()Calculates the round score based on the ante level and blind multiplier.- Returns:
- The round score as an integer.
-
getAnteScore
public int getAnteScore()Gets the base ante score for the current round.- Returns:
- The ante score as an integer.
-
setAnteCount
public void setAnteCount(int anteCount) Sets the ante count for the game.- Parameters:
anteCount- The new ante count to set.- Throws:
IllegalArgumentException- if the ante count is not between 1 andMAX_ANTE_COUNT
-
resetAnte
public void resetAnte()Resets the ante to the first round with the small blind. -
nextRound
public void nextRound()Moves to the next round of the ante system, adjusting the blind level and ante count. -
getNextBlind
-
setBlind
Sets the blind level manually.- Parameters:
blind- The new blind level.
-
getBlind
Gets the current blind level.- Returns:
- The current
Blindlevel.
-
getAnteCount
public int getAnteCount()Gets the current ante count.- Returns:
- The ante count as an integer.
-