This is a UL project to make a Poker game
This project is about coding a Poker Game. The game is between the computer (Player 1) and the human player (Player 2). The rules of the game per project specifications are:
- For each session, both players start with 10 tokens.
- For each round, each player receives 5 cards from the deck.
- The players (the code) verify if they are qualified to open, i.e., it needs to have at least a pair of “Jacks”
- Player 2 decides if wish to “open” the game. Player 1 by default will always open.
- If Player 2 decides to “open”, each player has to place one token “into the pot”
- Each player decides if wish to refresh the hands (it must keep at least one card of the original hand)
- Player 2 place the bet from 0 to 3 tokens.
- Computer decides to let you win or not.
- If computer want to “see” your cards, it has to match your bet.
- The best hands win and takes the tokens in the pot.
- The game ends when Player 2 decides it does or none of them has tokens to continue.
The winning order of hands in poker is:
- A royal flush (a straight flush starting at Ace and going down through King, Queen, Jack, to Ten)
- A straight flush (a straight but all in the same suit – the higher the better)
- Four of a kind (the higher the better)
- A flush (all the same suit - the higher the better)
- A straight (for example “4 clubs, 5 spades, 6 clubs, 7 diamond, 8 spades” - the higher the better)
- A full house (triplets and a pair - the higher the triplets, the better)
- Triplets (the higher the better)
- 2 pairs (the higher the better)
- 1 pair (the higher the better)