Package javatro.core

Class JavatroCore

java.lang.Object
javatro.core.JavatroCore

public class JavatroCore extends Object
The core game logic class that manages the game state and rounds.
  • Field Details

    • roundCount

      protected static int roundCount
      The current round count of the game.
    • ante

      protected static Ante ante
      The current ante for the game.
    • currentRound

      public static Round currentRound
      The current active round in the game.
    • deck

      public static Deck deck
      The deck used throughout the game. (A copy of this deck is made for every new Round)
    • heldJokers

      public static HeldJokers heldJokers
      The held jokers used throughout the game.
    • totalPlays

      public static int totalPlays
      The number of plays given per round (Default value = 4).
  • Constructor Details

    • JavatroCore

      public JavatroCore()
  • Method Details

    • getAnte

      public static Ante getAnte()
      Retrieves the current ante.
      Returns:
      the current Ante instance
    • getRoundCount

      public static int getRoundCount()
      Retrieves the current round count.
      Returns:
      the current round count
    • nextRound

      public void nextRound()
      Advances the game to the next round, updating the ante and incrementing the round count.
    • setupNewGame

      public void setupNewGame(Deck.DeckType deckType)
      Initializes a new game by resetting the ante, round count, jokers and decks.
      Parameters:
      deckType - The type of deck to be used for the new game.
    • beginGame

      public void beginGame()
      Starts the game by initializing a new set of game parameters. This method is called when the game begins.
    • initializePokerHandStats

      public static void initializePokerHandStats()
      Initializes poker hand play counts at game start
    • getPlayCount

      public static int getPlayCount(PokerHand.HandType handType)
      Gets the play count for a specific hand type
    • incrementPlayCount

      public static void incrementPlayCount(PokerHand.HandType handType)
      Increments the play count for a specific hand type