Package javatro.core
Class JavatroCore
java.lang.Object
javatro.core.JavatroCore
The core game logic class that manages the game state and rounds.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static AnteThe current ante for the game.static RoundThe current active round in the game.static DeckThe deck used throughout the game.static HeldJokersThe held jokers used throughout the game.protected static intThe current round count of the game.static intThe number of plays given per round (Default value = 4). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStarts the game by initializing a new set of game parameters.static AntegetAnte()Retrieves the current ante.static intgetPlayCount(PokerHand.HandType handType) Gets the play count for a specific hand typestatic intRetrieves the current round count.static voidincrementPlayCount(PokerHand.HandType handType) Increments the play count for a specific hand typestatic voidInitializes poker hand play counts at game startvoidAdvances the game to the next round, updating the ante and incrementing the round count.voidsetupNewGame(Deck.DeckType deckType) Initializes a new game by resetting the ante, round count, jokers and decks.
-
Field Details
-
roundCount
protected static int roundCountThe current round count of the game. -
ante
The current ante for the game. -
currentRound
The current active round in the game. -
deck
The deck used throughout the game. (A copy of this deck is made for every new Round) -
heldJokers
The held jokers used throughout the game. -
totalPlays
public static int totalPlaysThe number of plays given per round (Default value = 4).
-
-
Constructor Details
-
JavatroCore
public JavatroCore()
-
-
Method Details
-
getAnte
Retrieves the current ante.- Returns:
- the current
Anteinstance
-
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
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
Gets the play count for a specific hand type -
incrementPlayCount
Increments the play count for a specific hand type
-