This project is a command-line Texas Hold'em poker game built in modern C++17, featuring a multithreaded bot, clean MVC design, and strategic hand evaluation logic.
- ✅ Card & Deck generation (with emojis for suits
♠️ ♦️ ♥️ ♣️ ) - ✅ Full game loop with betting and showdown
- ✅ Bot opponent with Easy/Medium/Hard difficulty
- ✅ Multithreaded spinner animation while bot thinks
- ✅ Hand evaluator (frequency maps, sorting)
- ✅ Clear CLI interface (check, bet, fold actions)
- ✅ SOLID design with
BotPlayer
subclass - ✅ MVC Pattern: clean separation of model, controller, view
- 2 hole cards dealt to each player
- 5 community cards revealed in stages:
- Flop (3 cards)
- Turn (1 card)
- River (1 card)
- Make the best 5-card poker hand
- Actions:
check
,bet
,fold
- Win by:
- Forcing opponent to fold
- Having a better hand at showdown
- Royal Flush
- Straight Flush
- Four of a Kind
- Full House
- Flush
- Straight
- Three of a Kind
- Two Pair
- One Pair
- High Card
You can choose bot difficulty at the start:
- Easy: Randomly calls ~25% of the time
- Medium: Calls if hand ≥ One Pair
- Hard: Calls if hand is good, but may bluff ~20% with weak hands
- Card = suit + rank
- Deck = 52-card generation + shuffling
Player
: name, chip count, handBotPlayer
: subclass withshouldCallBet()
based on difficulty
- Uses frequency maps and sorted ranks
- Detects pairs, trips, flushes, full house, straights, etc.
- Manages game loop, betting, round progression
- Handles output formatting and emoji display
- Includes
Spinner
animation using multithreading
- Deal hole cards
- Reveal flop → turn → river
- User chooses action
- Bot decides based on difficulty
- Evaluate hands and determine winner
- Update chip counts
- Is my pre-flop hand strong?
- Did the flop improve my hand?
- What could the opponent be holding?
- Should I bluff or fold?
- What’s the pot odds and EV?
- macOS or Linux with clang++ or g++
- C++17 compatible terminal setup
- (Optional) Sublime Text or VSCode
make clean
make run
or without MakeFile
clang++ -std=c++17 main.cpp controller/poker_controller.cpp view/cli_view.cpp \
model/card.cpp model/deck.cpp model/player.cpp model/hand_evaluator.cpp \
model/advanced_hand_evaluator.cpp model/bot_player.cpp animation/spinner.cpp -o poker && ./poker