This is a Java-based implementation of Jacks or Better Video Poker, a popular casino game. The game is built using Swing for the graphical user interface (GUI) and follows the rules of traditional Jacks or Better poker. Players can place bets, hold cards, and draw new cards to form winning hands. The game calculates payouts based on the hand rankings.
- Graphical User Interface: Built with Java Swing for an interactive experience.
- Game States: The game follows a structured flow:
- Place a bet.
- Deal the initial 5-card hand.
- Hold 0-5 cards.
- Draw new cards for unheld positions.
- Evaluate the hand and calculate payouts.
- Bankroll Management: Tracks the player's credits and bets.
- Hand Evaluation: (To be implemented) Determines the player's winnings based on the final hand.
-
Start the Game:
-
Place a Bet:
-
Deal the Initial Hand:
- Click the Deal button to receive your initial 5-card hand.
- The game transitions to the First Draw state.
-
Hold Cards:
-
Draw New Cards:
- Click the Draw button to replace unheld cards with new ones.
- The game transitions to the Final Draw state.
-
Evaluate the Hand:
-
Repeat:
- Continue playing until you run out of credits or decide to quit.
| Hand | Payout Multiplier |
|---|---|
| Royal Flush | 250x |
| Straight Flush | 50x |
| Four of a Kind | 25x |
| Full House | 9x |
| Flush | 6x |
| Straight | 4x |
| Three of a Kind | 3x |
| Two Pair | 2x |
| Jacks or Better | 1x |
Here are some example hands to help you understand the different scoring combinations in Jacks or Better Video Poker:
-
Royal Flush
- Hand: Ace of Hearts, King of Hearts, Queen of Hearts, Jack of Hearts, Ten of Hearts
- Description: The highest-ranking hand, consisting of the top five cards in the same suit.
-
Straight Flush
- Hand: Nine of Spades, Eight of Spades, Seven of Spades, Six of Spades, Five of Spades
- Description: Five consecutive cards of the same suit.
-
Four of a Kind
- Hand: Four of Diamonds, Four of Hearts, Four of Clubs, Four of Spades, Nine of Hearts
- Description: Four cards of the same rank.
-
Full House
- Hand: Three of Hearts, Three of Diamonds, Three of Clubs, Two of Spades, Two of Hearts
- Description: Three cards of one rank and two cards of another rank.
-
Flush
- Hand: Ace of Clubs, Ten of Clubs, Seven of Clubs, Four of Clubs, Two of Clubs
- Description: Five cards of the same suit, not in sequence.
-
Straight
- Hand: Ten of Diamonds, Nine of Clubs, Eight of Hearts, Seven of Spades, Six of Diamonds
- Description: Five consecutive cards of any suit.
-
Three of a Kind
- Hand: King of Spades, King of Hearts, King of Diamonds, Eight of Clubs, Two of Hearts
- Description: Three cards of the same rank.
-
Two Pair
- Hand: Jack of Clubs, Jack of Diamonds, Seven of Hearts, Seven of Spades, Ace of Diamonds
- Description: Two cards of one rank and two cards of another rank.
-
Jacks or Better
- Hand: Queen of Hearts, Queen of Spades, Five of Diamonds, Three of Clubs, Two of Hearts
- Description: A single pair of Jacks, Queens, Kings, or Aces.
-
Clone the Repository:
git clone https://github.com/AB1775/VideoPoker.git cd VideoPoker -
Build the Project:
- Ensure you have Java installed.
- Use your preferred build tool (e.g., Maven or Gradle) to build the project:
or
mvn clean install
gradle build
-
Run the Game:
- Navigate to the
targetorbuilddirectory (depending on your build tool). - Execute the JAR file:
java -jar VideoPoker.jar
- Navigate to the
-
Enjoy the Game:
- Follow the instructions in the "How to Play" section to start playing.


