{"id":27624337,"url":"https://github.com/yashlad27/pokercpp","last_synced_at":"2025-10-19T20:16:44.742Z","repository":{"id":288682650,"uuid":"967482285","full_name":"yashlad27/pokercpp","owner":"yashlad27","description":"🃏 A command-line Texas Hold’em Poker game written in C++. Features basic game flow including dealing, hand evaluation, and a simple bot opponent. Built for practicing game logic, object-oriented design, and C++ fundamentals.","archived":false,"fork":false,"pushed_at":"2025-04-26T04:11:33.000Z","size":1760,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T17:50:27.637Z","etag":null,"topics":["ai","cli","cpp","game","monte-carlo-simulation","poker","stl-algorithms","vector"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yashlad27.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-16T14:18:44.000Z","updated_at":"2025-06-29T19:02:30.000Z","dependencies_parsed_at":"2025-04-20T13:03:09.908Z","dependency_job_id":null,"html_url":"https://github.com/yashlad27/pokercpp","commit_stats":null,"previous_names":["yashlad27/pokercpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yashlad27/pokercpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashlad27%2Fpokercpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashlad27%2Fpokercpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashlad27%2Fpokercpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashlad27%2Fpokercpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yashlad27","download_url":"https://codeload.github.com/yashlad27/pokercpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashlad27%2Fpokercpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278712702,"owners_count":26032741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cli","cpp","game","monte-carlo-simulation","poker","stl-algorithms","vector"],"created_at":"2025-04-23T11:32:22.704Z","updated_at":"2025-10-07T02:59:05.126Z","avatar_url":"https://github.com/yashlad27.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🃏 CLI Texas Hold'em Poker Game in C++\n\nThis 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.\n\n---\n\n## ♠️ Features (Implemented)\n\n- ✅ Card \u0026 Deck generation (with emojis for suits ♠️♦️♥️♣️)\n- ✅ Full game loop with betting and showdown\n- ✅ **Bot opponent with Easy/Medium/Hard difficulty**\n- ✅ **Multithreaded spinner animation** while bot thinks\n- ✅ Hand evaluator (frequency maps, sorting)\n- ✅ Clear CLI interface (check, bet, fold actions)\n- ✅ SOLID design with `BotPlayer` subclass\n- ✅ MVC Pattern: clean separation of model, controller, view\n\n---\n\n## 📜 Poker Rules - Texas Hold'em\n\n1. **2 hole cards** dealt to each player\n2. **5 community cards** revealed in stages:\n   - **Flop** (3 cards)\n   - **Turn** (1 card)\n   - **River** (1 card)\n3. Make the **best 5-card poker hand**\n4. Actions: `check`, `bet`, `fold`\n5. Win by:\n   - Forcing opponent to fold\n   - Having a better hand at showdown\n\n---\n\n## 🏆 Hand Rankings (Best to Worst)\n\n1. Royal Flush\n2. Straight Flush\n3. Four of a Kind\n4. Full House\n5. Flush\n6. Straight\n7. Three of a Kind\n8. Two Pair\n9. One Pair\n10. High Card\n\n---\n\n## 🤖 Bot Difficulty Logic\n\nYou can choose bot difficulty at the start:\n- **Easy**: Randomly calls ~25% of the time\n- **Medium**: Calls if hand ≥ One Pair\n- **Hard**: Calls if hand is good, but may bluff ~20% with weak hands\n\n---\n\n## 🧠 Architecture Overview\n\n### 🔹 `Card` \u0026 `Deck`\n- Card = suit + rank\n- Deck = 52-card generation + shuffling\n\n### 🔹 `Player` \u0026 `BotPlayer`\n- `Player`: name, chip count, hand\n- `BotPlayer`: subclass with `shouldCallBet()` based on difficulty\n\n### 🔹 `HandEvaluator`\n- Uses frequency maps and sorted ranks\n- Detects pairs, trips, flushes, full house, straights, etc.\n\n### 🔹 `PokerController`\n- Manages game loop, betting, round progression\n\n### 🔹 `CLIView`\n- Handles output formatting and emoji display\n- Includes `Spinner` animation using multithreading\n\n---\n\n## 🔄 How a Round Works\n\n1. Deal hole cards\n2. Reveal flop → turn → river\n3. User chooses action\n4. Bot decides based on difficulty\n5. Evaluate hands and determine winner\n6. Update chip counts\n\n---\n\n## 🤹 Strategy Guide: How Poker Players Think\n\n- Is my pre-flop hand strong?\n- Did the flop improve my hand?\n- What could the opponent be holding?\n- Should I bluff or fold?\n- What’s the pot odds and EV?\n\n---\n\n## 🧰 How to Run the Game\n\n### 📦 Requirements\n- macOS or Linux with **clang++ or g++**\n- C++17 compatible terminal setup\n- (Optional) Sublime Text or VSCode\n\n### ▶️ Compile and Run\n```bash\nmake clean\nmake run\n```\n\nor without MakeFile\n```bash\nclang++ -std=c++17 main.cpp controller/poker_controller.cpp view/cli_view.cpp \\\nmodel/card.cpp model/deck.cpp model/player.cpp model/hand_evaluator.cpp \\\nmodel/advanced_hand_evaluator.cpp model/bot_player.cpp animation/spinner.cpp -o poker \u0026\u0026 ./poker\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashlad27%2Fpokercpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashlad27%2Fpokercpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashlad27%2Fpokercpp/lists"}