Package javatro.core

Class Ante

java.lang.Object
javatro.core.Ante

public class Ante extends Object
The Ante class represents the ante system in a poker game, managing the current round, ante values, and blind progression.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum representing different blind levels with associated multipliers and names.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an Ante object with an initial ante count of 1 and the small blind level.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the current ante count.
    int
    Gets the base ante score for the current round.
    Gets the current blind level.
     
    int
    Calculates the round score based on the ante level and blind multiplier.
    void
    Moves to the next round of the ante system, adjusting the blind level and ante count.
    void
    Resets the ante to the first round with the small blind.
    void
    setAnteCount(int anteCount)
    Sets the ante count for the game.
    void
    Sets the blind level manually.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Ante

      public Ante()
      Constructs an Ante object 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 and MAX_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

      public Ante.Blind getNextBlind()
    • setBlind

      public void setBlind(Ante.Blind blind)
      Sets the blind level manually.
      Parameters:
      blind - The new blind level.
    • getBlind

      public Ante.Blind getBlind()
      Gets the current blind level.
      Returns:
      The current Blind level.
    • getAnteCount

      public int getAnteCount()
      Gets the current ante count.
      Returns:
      The ante count as an integer.