Terminal-based Texas Hold'em Poker game with AI opponents
Project description
Poker
A terminal-based Texas Hold'em Poker game with AI opponents.
Features
- 1-3 AI Opponents - Play heads-up or at a full 4-handed table
- 3 Difficulty Levels
- Easy - Loose passive "fish" that calls too much
- Medium - Tight aggressive "shark" with solid fundamentals
- Hard - Near-GTO play with opponent exploitation
- Full Poker Experience
- Pre-flop, Flop, Turn, River betting rounds
- Proper blind structure and dealer rotation
- All-in situations and side pots
- Real-time Odds - See your win probability and hand odds
- Hand Rankings Reference - Built-in guide for beginners
- Beautiful Terminal UI - Unicode cards with color suits
Installation
Homebrew (macOS)
brew tap tvyomkesh/poker
brew install poker
pip (All platforms)
pip install fairpoker
From source
git clone https://github.com/tvyomkesh/poker.git
cd poker
pip install -e .
Usage
# If installed via brew or pip:
poker
# Or:
fairpoker
# From source:
python main.py
Controls
| Key | Action |
|---|---|
C |
Check (when no bet) / Call (when facing bet) |
R |
Raise / Bet |
F |
Fold |
Q |
Quit |
N |
Next hand (after showdown) |
Requirements
- Terminal Size: 140 x 40 minimum
- Python: 3.8 or higher
- Platform: macOS, Linux, Windows (with windows-curses)
How to Play
- Select difficulty - Choose Easy, Medium, or Hard opponents
- Select number of bots - Play against 1, 2, or 3 AI players
- Play poker! - Standard Texas Hold'em rules apply:
- Each player gets 2 hole cards
- 5 community cards are dealt (3 on flop, 1 on turn, 1 on river)
- Best 5-card hand wins
- Bet, raise, call, or fold your way to victory!
Hand Rankings (Best to Worst)
- Royal Flush - A K Q J 10 same suit
- Straight Flush - 5 consecutive, same suit
- Four of a Kind - 4 cards same rank
- Full House - 3 of a kind + pair
- Flush - 5 cards same suit
- Straight - 5 consecutive cards
- Three of a Kind - 3 cards same rank
- Two Pair - 2 different pairs
- One Pair - 2 cards same rank
- High Card - Highest card wins
License
MIT License - see LICENSE for details.
Author
Vyomkesh Tripathi
Made with Python and curses. No actual gambling involved!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fairpoker-1.2.0.tar.gz
(35.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
fairpoker-1.2.0-py3-none-any.whl
(43.1 kB
view details)
File details
Details for the file fairpoker-1.2.0.tar.gz.
File metadata
- Download URL: fairpoker-1.2.0.tar.gz
- Upload date:
- Size: 35.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0bf9deb5abef8939911553598ade609f63b8ba1c1e7471d28904548eb187c51
|
|
| MD5 |
85dc8624ae2ef752154b8406723e3e0c
|
|
| BLAKE2b-256 |
f5c69d7a81432002c9fd765b2a382007e1db5724f8ab5a08faecf2deca33d49f
|
File details
Details for the file fairpoker-1.2.0-py3-none-any.whl.
File metadata
- Download URL: fairpoker-1.2.0-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
597e1dcb3f7da035e3bf87e64e3588d9e9d34531ebd8f91443f04913d9e33495
|
|
| MD5 |
61085e59cbd6cccaab1010d6a62028c4
|
|
| BLAKE2b-256 |
d06993d3868a53062dff08bd425aac2c4e98eaab8944432fe5b9b913d88cc223
|